summary refs log tree commit diff
path: root/pkgs/tools/security/krunner-pass
diff options
context:
space:
mode:
authorYannik Sander <me@ysndr.de>2018-03-20 22:42:08 +0100
committeradisbladis <adis@blad.is>2018-04-03 19:01:58 +0800
commit0c95dee8cb44ebb0df74e95e236d4d06042a0c0e (patch)
tree6fd8a3ed8f38fc607b8f30ed12631058117b40b8 /pkgs/tools/security/krunner-pass
parent09b16a92aff4e62379371672c3d521022a912b53 (diff)
downloadnixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.tar
nixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.tar.gz
nixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.tar.bz2
nixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.tar.lz
nixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.tar.xz
nixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.tar.zst
nixpkgs-0c95dee8cb44ebb0df74e95e236d4d06042a0c0e.zip
krunner-pass: init at version 1.3.0
Diffstat (limited to 'pkgs/tools/security/krunner-pass')
-rw-r--r--pkgs/tools/security/krunner-pass/default.nix44
-rw-r--r--pkgs/tools/security/krunner-pass/pass-path.patch13
2 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/tools/security/krunner-pass/default.nix b/pkgs/tools/security/krunner-pass/default.nix
new file mode 100644
index 00000000000..dac6df56a79
--- /dev/null
+++ b/pkgs/tools/security/krunner-pass/default.nix
@@ -0,0 +1,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;
+  };
+}
diff --git a/pkgs/tools/security/krunner-pass/pass-path.patch b/pkgs/tools/security/krunner-pass/pass-path.patch
new file mode 100644
index 00000000000..4ceb3c5d92d
--- /dev/null
+++ b/pkgs/tools/security/krunner-pass/pass-path.patch
@@ -0,0 +1,13 @@
+diff --git a/pass.cpp b/pass.cpp
+index c02f9d0..85c5b99 100644
+--- a/pass.cpp
++++ b/pass.cpp
+@@ -193,7 +193,7 @@ void Pass::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &m
+     } else {
+         args << "show" << match.text();
+     }
+-    pass->start("pass", args);
++    pass->start(NIXPKGS_PASS, args);
+
+     connect(pass, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
+             [=](int exitCode, QProcess::ExitStatus exitStatus) {