From 3cac3df72462be92c75bf81408bccbddc2b901dd Mon Sep 17 00:00:00 2001 From: freezeboy Date: Mon, 14 Dec 2020 17:31:03 +0100 Subject: [PATCH] ssh-ident: change PATH The wrapper is not working anymore, so the ssh-agent is no more shared, as the script removes the environment PATH variable, I pinned the ssh-agent binary and removed the wrapper. Also, as this script doesn't require a compiler, I switched from stdenv to stdenvNoCC. --- pkgs/tools/networking/ssh-ident/default.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/networking/ssh-ident/default.nix b/pkgs/tools/networking/ssh-ident/default.nix index c64a8ba945c0..1822eda26278 100644 --- a/pkgs/tools/networking/ssh-ident/default.nix +++ b/pkgs/tools/networking/ssh-ident/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, python3, makeWrapper, openssh }: +{ stdenvNoCC, lib, fetchFromGitHub, python3, openssh}: -stdenv.mkDerivation { +stdenvNoCC.mkDerivation { pname = "ssh-ident"; version = "2016-04-21"; src = fetchFromGitHub { @@ -10,19 +10,22 @@ stdenv.mkDerivation { sha256 = "1jf19lz1gwn7cyp57j8d4zs5bq13iw3kw31m8nvr8h6sib2pf815"; }; - buildInputs = [ python3 makeWrapper ]; + postPatch = '' + substituteInPlace ssh-ident \ + --replace 'ssh-agent >' '${openssh}/bin/ssh-agent >' + ''; + buildInputs = [ python3 ]; + installPhase = '' mkdir -p $out/bin install -m 755 ssh-ident $out/bin/ssh-ident - wrapProgram $out/bin/ssh-ident \ - --prefix PATH : ${lib.makeBinPath [ openssh ]} ''; - meta = { + meta = with lib; { homepage = "https://github.com/ccontavalli/ssh-ident"; description = "Start and use ssh-agent and load identities as necessary"; - license = lib.licenses.bsd2; - maintainers = with lib.maintainers; [ telotortium ]; - platforms = with lib.platforms; unix; + license = licenses.bsd2; + maintainers = with maintainers; [ telotortium ]; + platforms = with platforms; unix; }; }