~andir/nixpkgs-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
6 2

[PATCH v3] wemux: init at 2021-04-16

Details
Message ID
<20210419002256.30999-1-ben@bsima.me>
DKIM signature
pass
Download raw message
Patch: +38 -0
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.

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 {
  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
Details
Message ID
<20210419133640.z5wm3to66qh4wghw@quiver>
In-Reply-To
<20210419002256.30999-1-ben@bsima.me> (view parent)
DKIM signature
missing
Download raw message
On Sun, Apr 18, 2021 at 08:22:56PM -0400, Ben Sima wrote:
>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
Details
Message ID
<20210419134450.r3pd43gyelvdfhag@quiver>
In-Reply-To
<20210419133640.z5wm3to66qh4wghw@quiver> (view parent)
DKIM signature
missing
Download raw message
On Mon, Apr 19, 2021 at 06:36:40AM -0700, William Casarin wrote:
>On Sun, Apr 18, 2021 at 08:22:56PM -0400, Ben Sima wrote:
>>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...

she* (°ー°〃)
Details
Message ID
<20210419135901.vz3ih2posvarw6sb@quiver>
In-Reply-To
<20210419133640.z5wm3to66qh4wghw@quiver> (view parent)
DKIM signature
missing
Download raw message
On Mon, Apr 19, 2021 at 06:36:40AM -0700, William Casarin wrote:
>On Sun, Apr 18, 2021 at 08:22:56PM -0400, Ben Sima wrote:
>>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...

I probably shouldn't do review before I had coffee. I see that this is
only patching the script to look in that location instead of installing
anything. so this comment is incorrect.
Details
Message ID
<20210419135948.ycfibrau2uom6rch@quiver>
In-Reply-To
<20210419002256.30999-1-ben@bsima.me> (view parent)
DKIM signature
missing
Download raw message
Reviewed-by: William Casarin <jb55@jb55.com>
Details
Message ID
<20210420165920.65g4riltf3h5didm@quiver>
In-Reply-To
<20210419002256.30999-1-ben@bsima.me> (view parent)
DKIM signature
missing
Download raw message
PR here:

https://github.com/NixOS/nixpkgs/pull/119964
Details
Message ID
<87a6psafsv.fsf@bsima.me>
In-Reply-To
<20210420165920.65g4riltf3h5didm@quiver> (view parent)
DKIM signature
pass
Download raw message
Oh wow and it was already merged, thanks!
Reply to thread Export thread (mbox)