nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenvNoCC,
3 lib,
4 fetchFromGitHub,
5 python3,
6 openssh,
7}:
8
9stdenvNoCC.mkDerivation {
10 pname = "ssh-ident";
11 version = "2016-04-21";
12 src = fetchFromGitHub {
13 owner = "ccontavalli";
14 repo = "ssh-ident";
15 rev = "ebf8282728211dc4448d50f7e16e546ed03c22d2";
16 sha256 = "1jf19lz1gwn7cyp57j8d4zs5bq13iw3kw31m8nvr8h6sib2pf815";
17 };
18
19 postPatch = ''
20 substituteInPlace ssh-ident \
21 --replace 'ssh-agent >' '${openssh}/bin/ssh-agent >'
22 '';
23 buildInputs = [ python3 ];
24
25 installPhase = ''
26 mkdir -p $out/bin
27 install -m 755 ssh-ident $out/bin/ssh-ident
28 '';
29
30 meta = {
31 homepage = "https://github.com/ccontavalli/ssh-ident";
32 description = "Start and use ssh-agent and load identities as necessary";
33 license = lib.licenses.bsd2;
34 maintainers = with lib.maintainers; [ telotortium ];
35 platforms = with lib.platforms; unix;
36 mainProgram = "ssh-ident";
37 };
38}