nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 mkDerivation,
3 lib,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 extra-cmake-modules,
8 kauth,
9 krunner,
10 pass,
11}:
12
13mkDerivation rec {
14 pname = "krunner-pass";
15 # when upgrading the version, check if cmakeFlags is still needed
16 version = "1.3.0";
17
18 src = fetchFromGitHub {
19 owner = "akermu";
20 repo = "krunner-pass";
21 rev = "v${version}";
22 sha256 = "032fs2174ls545kjixbhzyd65wgxkw4s5vg8b20irc5c9ak3pxm0";
23 };
24
25 buildInputs = [
26 kauth
27 krunner
28 (pass.withExtensions (p: with p; [ pass-otp ]))
29 ];
30
31 nativeBuildInputs = [
32 cmake
33 extra-cmake-modules
34 ];
35
36 patches = [
37 (fetchpatch {
38 url = "https://github.com/peterhoeg/krunner-pass/commit/be2695f4ae74b0cccec8294defcc92758583d96b.patch";
39 sha256 = "098dqnal57994p51p2srfzg4lgcd6ybp29h037llr9cdv02hdxvl";
40 name = "fix_build.patch";
41 })
42 ./pass-path.patch
43 ];
44
45 CXXFLAGS = [
46 ''-DNIXPKGS_PASS=\"${lib.getBin pass}/bin/pass\"''
47 ];
48
49 cmakeFlags = [
50 # there are *lots* of pointless warnings in v1.3.0
51 "-Wno-dev"
52 # required for kf5auth to work correctly
53 "-DCMAKE_POLICY_DEFAULT_CMP0012=NEW"
54 ];
55
56 meta = with lib; {
57 description = "Integrates krunner with pass the unix standard password manager (https://www.passwordstore.org/)";
58 homepage = "https://github.com/akermu/krunner-pass";
59 license = licenses.gpl3;
60 maintainers = with maintainers; [ ysndr ];
61 platforms = platforms.unix;
62 };
63}