2022-03-03 04:25:46 +01:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
|
|
|
, kauth
|
|
|
|
, krunner
|
|
|
|
, pass
|
|
|
|
}:
|
2018-03-20 22:42:08 +01:00
|
|
|
|
2019-05-03 03:44:03 +02:00
|
|
|
mkDerivation rec {
|
2018-03-20 22:42:08 +01:00
|
|
|
pname = "krunner-pass";
|
2022-03-03 04:25:46 +01:00
|
|
|
# when upgrading the version, check if cmakeFlags is still needed
|
2018-03-20 22:42:08 +01:00
|
|
|
version = "1.3.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "akermu";
|
|
|
|
repo = "krunner-pass";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "032fs2174ls545kjixbhzyd65wgxkw4s5vg8b20irc5c9ak3pxm0";
|
|
|
|
};
|
|
|
|
|
2022-03-03 04:25:46 +01:00
|
|
|
buildInputs = [
|
|
|
|
kauth
|
|
|
|
krunner
|
|
|
|
(pass.withExtensions (p: with p; [ pass-otp ]))
|
2018-03-20 22:42:08 +01:00
|
|
|
];
|
|
|
|
|
2019-05-03 03:44:03 +02:00
|
|
|
nativeBuildInputs = [ cmake extra-cmake-modules ];
|
2018-03-20 22:42:08 +01:00
|
|
|
|
|
|
|
patches = [
|
2019-05-03 03:44:03 +02:00
|
|
|
(fetchpatch {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://github.com/peterhoeg/krunner-pass/commit/be2695f4ae74b0cccec8294defcc92758583d96b.patch";
|
2019-05-03 03:44:03 +02:00
|
|
|
sha256 = "098dqnal57994p51p2srfzg4lgcd6ybp29h037llr9cdv02hdxvl";
|
|
|
|
name = "fix_build.patch";
|
|
|
|
})
|
2018-03-20 22:42:08 +01:00
|
|
|
./pass-path.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
CXXFLAGS = [
|
2019-05-03 03:44:03 +02:00
|
|
|
''-DNIXPKGS_PASS=\"${lib.getBin pass}/bin/pass\"''
|
2018-03-20 22:42:08 +01:00
|
|
|
];
|
|
|
|
|
2022-11-15 08:26:35 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
# there are *lots* of pointless warnings in v1.3.0
|
|
|
|
"-Wno-dev"
|
|
|
|
# required for kf5auth to work correctly
|
|
|
|
"-DCMAKE_POLICY_DEFAULT_CMP0012=NEW"
|
|
|
|
];
|
2022-03-03 04:25:46 +01:00
|
|
|
|
2019-05-03 03:44:03 +02:00
|
|
|
meta = with lib; {
|
2018-03-20 22:42:08 +01:00
|
|
|
description = "Integrates krunner with pass the unix standard password manager (https://www.passwordstore.org/)";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/akermu/krunner-pass";
|
2018-03-20 22:42:08 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ ysndr ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|