Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 54 lines 1.8 kB view raw
1{ mkDerivation, fetchFromGitHub, lib, makeWrapper, pkg-config 2, kcoreaddons, ki18n, kwallet, mksh, pinentry-qt }: 3 4mkDerivation rec { 5 pname = "kwalletcli"; 6 version = "3.03"; 7 8 src = fetchFromGitHub { 9 owner = "MirBSD"; 10 repo = pname; 11 rev = "${pname}-${lib.replaceStrings [ "." ] [ "_" ] version}"; 12 sha256 = "sha256-DUtaQITzHhQrqA9QJd0U/5EDjH0IzY9/kal/7SYQ/Ck="; 13 }; 14 15 postPatch = '' 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 22 23 substituteInPlace pinentry-kwallet \ 24 --replace '/usr/bin/env mksh' ${mksh}/bin/mksh 25 26 substituteInPlace kwalletcli_getpin \ 27 --replace '/usr/bin/env mksh' ${mksh}/bin/mksh 28 ''; 29 30 makeFlags = [ "KDE_VER=5" ]; 31 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) ]; 35 36 preInstall = '' 37 mkdir -p $out/bin $out/share/man/man1 38 ''; 39 40 postInstall = '' 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 45 done 46 ''; 47 48 meta = with lib; { 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 ]; 53 }; 54}