[PATCH v3] wemux: init at 2021-04-16
Export this patch
The usual wemux.conf location is /usr/local/etc, but that directory doesn't
exist, so we patch the script to look in /etc.
---
I forgot I had manually created /usr/local/etc, but we can't assume the user
will know to do that. qyliss on #nixos said to put it in /etc.
I think he might have meant $out/etc? I don't believe /etc is a valid
build output location...
Other comments were addressed.
pkgs/tools/misc/wemux/default.nix | 36 +++++++++++++++++++++++++++++++
pkgs/top-level/all-packages.nix | 2 ++
2 files changed, 38 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..63a91b7a678
--- /dev/null
+++ b/pkgs/tools/misc/wemux/default.nix
@@ -0,0 +1,36 @@
+ { stdenv, lib, fetchFromGitHub, tmux, installShellFiles }:
+
+ stdenv.mkDerivation rec {
nit: it doesn't seem like rec is needed
+ pname = "wemux";
+ version = "2021-04-16";
+
+ src = fetchFromGitHub {
+ owner = "zolrath";
+ repo = "wemux";
+ rev = "01c6541f8deceff372711241db2a13f21c4b210c";
+ sha256 = "1y962nzvs7sf720pl3wa582l6irxc8vavd0gp4ag4243b2gs4qvm";
+ };
+
+ nativeBuildInputs = [ installShellFiles ];
+
+ installPhase = ''
+ runHook preInstall
+ substituteInPlace wemux --replace tmux ${tmux}/bin/tmux
+
+ # change default config location to /etc/wemux.conf
+ substituteInPlace wemux --replace "/usr/local/etc" "/etc"
+ substituteInPlace man/wemux.1 --replace "/usr/local/etc" "/etc"
+
+ install -Dm755 wemux -t $out/bin
+ installManPage man/wemux.1
+ runHook postInstall
+ '';
+
+ 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
Reviewed-by: William Casarin <jb55@jb55.com>
PR here:
https://github.com/NixOS/nixpkgs/pull/119964