2021-02-05 17:12:51 +00:00
|
|
|
{ mkDerivation, fetchFromGitHub, lib, makeWrapper, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, kcoreaddons, ki18n, kwallet, mksh, pinentry-qt }:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "kwalletcli";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "3.03";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MirBSD";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "sha256-DUtaQITzHhQrqA9QJd0U/5EDjH0IzY9/kal/7SYQ/Ck=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace GNUmakefile \
|
|
|
|
--replace -I/usr/include/KF5/KCoreAddons -I${kcoreaddons.dev}/include/KF5/KCoreAddons \
|
|
|
|
--replace -I/usr/include/KF5/KI18n -I${ki18n.dev}/include/KF5/KI18n \
|
|
|
|
--replace -I/usr/include/KF5/KWallet -I${kwallet.dev}/include/KF5/KWallet \
|
|
|
|
--replace /usr/bin $out/bin \
|
|
|
|
--replace /usr/share/man $out/share/man
|
|
|
|
|
|
|
|
substituteInPlace pinentry-kwallet \
|
|
|
|
--replace '/usr/bin/env mksh' ${mksh}/bin/mksh
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
substituteInPlace kwalletcli_getpin \
|
|
|
|
--replace '/usr/bin/env mksh' ${mksh}/bin/mksh
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "KDE_VER=5" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
# if using just kwallet, cmake will be added as a buildInput and fail the build
|
|
|
|
propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-09-09 14:08:57 +00:00
|
|
|
for program in pinentry-kwallet kwalletcli_getpin; do
|
|
|
|
wrapProgram $out/bin/$program \
|
|
|
|
--prefix PATH : $out/bin:${lib.makeBinPath [ pinentry-qt ]} \
|
|
|
|
--set-default PINENTRY pinentry-qt
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command-Line Interface to the KDE Wallet";
|
|
|
|
homepage = "https://www.mirbsd.org/kwalletcli.htm";
|
|
|
|
license = licenses.miros;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|