diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/security/krunner-pass')
-rw-r--r-- | nixpkgs/pkgs/tools/security/krunner-pass/default.nix | 43 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/security/krunner-pass/pass-path.patch | 13 |
2 files changed, 56 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; + }; +} diff --git a/nixpkgs/pkgs/tools/security/krunner-pass/pass-path.patch b/nixpkgs/pkgs/tools/security/krunner-pass/pass-path.patch new file mode 100644 index 000000000000..4ceb3c5d92da --- /dev/null +++ b/nixpkgs/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) { |