summary refs log tree commit diff
path: root/pkgs/tools/security/pass/extensions/tomb.nix
blob: 43c74a9029b3a6f90c73a45ba9248c8f09f602a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchFromGitHub, tomb }:

stdenv.mkDerivation rec {
  pname = "pass-tomb";
  version = "1.1";

  src = fetchFromGitHub {
    owner = "roddhjav";
    repo = "pass-tomb";
    rev = "v${version}";
    sha256 = "0wxa673yyzasjlkpd5f3yl5zf7bhsw7h1jbhf6sdjz65bypr2596";
  };

  buildInputs = [ tomb ];

  dontBuild = true;

  installFlags = [ "PREFIX=$(out)" ];

  postFixup = ''
    substituteInPlace $out/lib/password-store/extensions/tomb.bash \
      --replace 'TOMB="''${PASSWORD_STORE_TOMB:-tomb}"' 'TOMB="''${PASSWORD_STORE_TOMB:-${tomb}/bin/tomb}"'
  '';

  meta = with stdenv.lib; {
    description = "Pass extension that keeps the password store encrypted inside a tomb";
    homepage = "https://github.com/roddhjav/pass-tomb";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ lovek323 fpletz tadfisher ];
    platforms = platforms.unix;
  };
}