2021-01-17 03:51:22 +00:00
|
|
|
{ mkDerivation, fetchFromGitHub, lib, makeWrapper, pkg-config
|
2019-10-13 23:14:42 +01:00
|
|
|
, kcoreaddons, ki18n, kwallet, mksh, pinentry-qt }:
|
2019-04-27 10:20:34 +01:00
|
|
|
|
|
|
|
mkDerivation rec {
|
2017-06-01 12:11:21 +01:00
|
|
|
pname = "kwalletcli";
|
2019-01-08 03:12:54 +00:00
|
|
|
version = "3.02";
|
2017-06-01 12:11:21 +01:00
|
|
|
|
2019-04-27 10:20:34 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MirBSD";
|
|
|
|
repo = pname;
|
|
|
|
rev = "${pname}-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
|
|
|
sha256 = "1gq45afb5nmmjfqxglv7wvcxcjd9822pc7nysq0350jmmmqwb474";
|
2017-06-01 12:11:21 +01:00
|
|
|
};
|
|
|
|
|
2017-05-16 16:56:41 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace GNUmakefile \
|
2019-04-27 10:20:34 +01:00
|
|
|
--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
|
2017-05-16 16:56:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "KDE_VER=5" ];
|
|
|
|
|
2021-01-17 03:51:22 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper pkg-config ];
|
2017-05-16 16:56:41 +01: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
|
|
|
|
'';
|
|
|
|
|
2019-04-27 10:20:34 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/pinentry-kwallet \
|
2019-10-13 23:14:42 +01:00
|
|
|
--prefix PATH : $out/bin:${lib.makeBinPath [ pinentry-qt ]} \
|
2019-04-27 10:20:34 +01:00
|
|
|
--set-default PINENTRY pinentry-qt
|
|
|
|
'';
|
|
|
|
|
2017-05-16 16:56:41 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Command-Line Interface to the KDE Wallet";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.mirbsd.org/kwalletcli.htm";
|
2017-05-16 16:56:41 +01:00
|
|
|
license = licenses.miros;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
2017-06-01 12:11:21 +01:00
|
|
|
}
|