about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/krunner-pass/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security/krunner-pass/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/security/krunner-pass/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/krunner-pass/default.nix b/nixpkgs/pkgs/tools/security/krunner-pass/default.nix
new file mode 100644
index 000000000000..7904235b86a4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/krunner-pass/default.nix
@@ -0,0 +1,43 @@
+{ mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, extra-cmake-modules
+, kauth, krunner
+, pass, pass-otp ? null }:
+
+mkDerivation rec {
+  pname = "krunner-pass";
+  version = "1.3.0";
+
+  src = fetchFromGitHub {
+    owner = "akermu";
+    repo = "krunner-pass";
+    rev = "v${version}";
+    sha256 = "032fs2174ls545kjixbhzyd65wgxkw4s5vg8b20irc5c9ak3pxm0";
+  };
+
+  buildInputs  = [
+    kauth krunner
+    pass 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\"''
+  ];
+
+  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;
+  };
+}