1 { mkDerivation, fetchFromGitHub, lib, makeWrapper, pkg-config
2 , kcoreaddons, ki18n, kwallet, mksh, pinentry-qt }:
8 src = fetchFromGitHub {
11 rev = "${pname}-${lib.replaceStrings [ "." ] [ "_" ] version}";
12 sha256 = "sha256-DUtaQITzHhQrqA9QJd0U/5EDjH0IzY9/kal/7SYQ/Ck=";
16 substituteInPlace GNUmakefile \
17 --replace -I/usr/include/KF5/KCoreAddons -I${kcoreaddons.dev}/include/KF5/KCoreAddons \
18 --replace -I/usr/include/KF5/KI18n -I${ki18n.dev}/include/KF5/KI18n \
19 --replace -I/usr/include/KF5/KWallet -I${kwallet.dev}/include/KF5/KWallet \
20 --replace /usr/bin $out/bin \
21 --replace /usr/share/man $out/share/man
23 substituteInPlace pinentry-kwallet \
24 --replace '/usr/bin/env mksh' ${mksh}/bin/mksh
26 substituteInPlace kwalletcli_getpin \
27 --replace '/usr/bin/env mksh' ${mksh}/bin/mksh
30 makeFlags = [ "KDE_VER=5" ];
32 nativeBuildInputs = [ makeWrapper pkg-config ];
33 # if using just kwallet, cmake will be added as a buildInput and fail the build
34 propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ];
37 mkdir -p $out/bin $out/share/man/man1
41 for program in pinentry-kwallet kwalletcli_getpin; do
42 wrapProgram $out/bin/$program \
43 --prefix PATH : $out/bin:${lib.makeBinPath [ pinentry-qt ]} \
44 --set-default PINENTRY pinentry-qt
49 description = "Command-Line Interface to the KDE Wallet";
50 homepage = "https://www.mirbsd.org/kwalletcli.htm";
51 license = licenses.miros;
52 maintainers = with maintainers; [ peterhoeg ];