about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/krunner-pass/default.nix
blob: a9f2c241d21c5e34a1603806272f487c884d1c3d (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
45
46
47
48
49
50
51
52
53
54
55
{ mkDerivation
, lib
, fetchFromGitHub
, fetchpatch
, cmake
, extra-cmake-modules
, kauth
, krunner
, pass
}:

mkDerivation rec {
  pname = "krunner-pass";
  # when upgrading the version, check if cmakeFlags is still needed
  version = "1.3.0";

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

  buildInputs = [
    kauth
    krunner
    (pass.withExtensions (p: with p; [ pass-otp ]))
  ];

  nativeBuildInputs = [ cmake extra-cmake-modules ];

  patches = [
    (fetchpatch {
      url = "https://github.com/peterhoeg/krunner-pass/commit/be2695f4ae74b0cccec8294defcc92758583d96b.patch";
      sha256 = "098dqnal57994p51p2srfzg4lgcd6ybp29h037llr9cdv02hdxvl";
      name = "fix_build.patch";
    })
    ./pass-path.patch
  ];

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

  # there are *lots* of pointless warnings in v1.3.0
  cmakeFlags = [ "-Wno-dev" ];

  meta = with 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;
  };
}