about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/krunner-pass/default.nix
blob: dac6df56a79642f7cbf59706cdf9f67464c0aa58 (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
33
34
35
36
37
38
39
40
41
42
43
44
{ mkDerivation, stdenv,
  fetchFromGitHub,
  cmake, extra-cmake-modules, gnumake,

  pass, pass-otp ? null, krunner,
}:
let
  pname = "krunner-pass";
  version = "1.3.0";
in
mkDerivation rec {
  name = "${pname}-${version}";

  src = fetchFromGitHub {
    owner = "akermu";
    repo = "krunner-pass";
    rev = "v${version}";
    sha256 = "032fs2174ls545kjixbhzyd65wgxkw4s5vg8b20irc5c9ak3pxm0";
  };

  buildInputs  = [
    pass
    pass-otp
    krunner
  ];

  nativeBuildInputs = [cmake extra-cmake-modules gnumake];

  patches = [
    ./pass-path.patch
  ];

  CXXFLAGS = [
    ''-DNIXPKGS_PASS=\"${stdenv.lib.getBin pass}/bin/pass\"''
  ];

  meta = with stdenv.lib; {
    description = "Integrates krunner with pass the unix standard password manager (https://www.passwordstore.org/)";
    homepage = https://github.com/akermu/krunner-pass;
    license = licenses.gpl3;
    maintainers = with maintainers; [ ysndr ];
    platforms = platforms.unix;
  };
}