lol
1{ lib
2, stdenv
3, fetchFromGitHub
4, installShellFiles
5, makeWrapper
6, coreutils
7, openssh
8, gnupg
9, perl
10, procps
11, gnugrep
12, gawk
13, findutils
14, gnused
15}:
16
17stdenv.mkDerivation rec {
18 pname = "keychain";
19 version = "2.8.5";
20
21 src = fetchFromGitHub {
22 owner = "funtoo";
23 repo = "keychain";
24 rev = version;
25 sha256 = "1bkjlg0a2bbdjhwp37ci1rwikvrl4s3xlbf2jq2z4azc96dr83mj";
26 };
27
28 nativeBuildInputs = [ installShellFiles makeWrapper ];
29 buildInputs = [ perl ];
30
31 installPhase = ''
32 mkdir -p $out/bin
33 cp keychain $out/bin/keychain
34 installManPage keychain.1
35 wrapProgram $out/bin/keychain \
36 --prefix PATH ":" "${lib.makeBinPath [ coreutils findutils gawk gnupg gnugrep gnused openssh procps ]}" \
37 '';
38
39 meta = with lib; {
40 description = "Keychain management tool";
41 longDescription = ''
42 Keychain helps you to manage SSH and GPG keys in a convenient and secure
43 manner. It acts as a frontend to ssh-agent and ssh-add, but allows you
44 to easily have one long running ssh-agent process per system, rather
45 than the norm of one ssh-agent per login session.
46
47 This dramatically reduces the number of times you need to enter your
48 passphrase. With keychain, you only need to enter a passphrase once
49 every time your local machine is rebooted. Keychain also makes it easy
50 for remote cron jobs to securely "hook in" to a long-running ssh-agent
51 process, allowing your scripts to take advantage of key-based logins.
52 '';
53 homepage = "https://www.funtoo.org/Keychain";
54 license = licenses.gpl2;
55 platforms = platforms.unix;
56 maintainers = with maintainers; [ sigma SuperSandro2000 ];
57 };
58}