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.
This commit is contained in:
freezeboy 2020-12-14 17:31:03 +01:00
parent 3510fa2878
commit 3cac3df724

View file

@ -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;
};
}