[PATCH v2] wemux: init at 2021-04-16
Export this patch
---
Addressed comments and added the man page.
pkgs/tools/misc/wemux/default.nix | 31 +++++++++++++++++++++++++++++++
pkgs/top-level/all-packages.nix | 2 ++
2 files changed, 33 insertions(+)
create mode 100644 pkgs/tools/misc/wemux/default.nix
diff --git a/pkgs/tools/misc/wemux/default.nix b/pkgs/tools/misc/wemux/default.nix
new file mode 100644
index 00000000000..0baf41940cb
--- /dev/null
+++ b/pkgs/tools/misc/wemux/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, tmux, installShellFiles }:
+
+stdenv.mkDerivation rec {
+ name = "wemux-${version}";
pname = "wemux"
Use `pname = "wemux";`, the rest is done by `mkDerivation` for you.
+ version = "2021-04-16";
+ src = fetchFromGitHub {
+ owner = "zolrath";
+ repo = "wemux";
+ rev = "01c6541f8deceff372711241db2a13f21c4b210c";
+ sha256 = "1y962nzvs7sf720pl3wa582l6irxc8vavd0gp4ag4243b2gs4qvm";
+ };
nit: last time I submitted a PR, reviewers complained about spacing
around attributes. maybe add some spacing around larger attrs? ie.
pname = "wemux";
version = "2021-04-16";
src = fetchFromGitHub {
owner = "zolrath";
repo = "wemux";
rev = "01c6541f8deceff372711241db2a13f21c4b210c";
sha256 = "1y962nzvs7sf720pl3wa582l6irxc8vavd0gp4ag4243b2gs4qvm";
};
buildInputs = [ tmux ];
nativeBuildInputs = [ installShellFiles ];
... etc
+ buildInputs = [ tmux ];
is this necessary?
+ nativeBuildInputs = [ installShellFiles ];
+ installPhase = ''
+ runHook preInstall
+ mkdir -p $out/bin
is mkdir necessary here? I think install -D does this for us?
+ substitute wemux wemux --replace tmux ${tmux}/bin/tmux
haven't seen this before, I've always used:
substituteInPlace wemux --replace tmux ${tmux}/bin/tmux
+ install -Dm755 wemux -t $out/bin
+ runHook postInstall
+ '';
+ postInstall = ''
+ installManPage man/wemux.1
+ '';
+ meta = with lib; {
+ homepage = "https://github.com/zolrath/wemux";
+ description = "Multi-user tmux made easy";
+ license = licenses.mit;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ bsima ];
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1aaa5d59a66..e38e504256d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7757,6 +7757,8 @@ in
welkin = callPackage ../tools/graphics/welkin {};
+ wemux = callPackage ../tools/misc/wemux { };
+
wf-recorder = callPackage ../applications/video/wf-recorder { };
whipper = callPackage ../applications/audio/whipper { };
--
2.31.1
Hey Ben,
Just a few things.
Couldn't this be moved into the instalPhase as well?