From 0c95dee8cb44ebb0df74e95e236d4d06042a0c0e Mon Sep 17 00:00:00 2001 From: Yannik Sander Date: Tue, 20 Mar 2018 22:42:08 +0100 Subject: krunner-pass: init at version 1.3.0 --- pkgs/tools/security/krunner-pass/default.nix | 44 ++++++++++++++++++++++++ pkgs/tools/security/krunner-pass/pass-path.patch | 13 +++++++ 2 files changed, 57 insertions(+) create mode 100644 pkgs/tools/security/krunner-pass/default.nix create mode 100644 pkgs/tools/security/krunner-pass/pass-path.patch (limited to 'pkgs/tools/security/krunner-pass') diff --git a/pkgs/tools/security/krunner-pass/default.nix b/pkgs/tools/security/krunner-pass/default.nix new file mode 100644 index 000000000000..dac6df56a796 --- /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 000000000000..4ceb3c5d92da --- /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(&QProcess::finished), + [=](int exitCode, QProcess::ExitStatus exitStatus) { -- cgit 1.4.1