3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/security/kwalletcli/default.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

2021-01-17 03:51:22 +00:00
{ mkDerivation, fetchFromGitHub, lib, makeWrapper, pkg-config
, 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";
2021-01-30 11:06:40 +00:00
version = "3.03";
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}";
2021-01-30 11:06:40 +00:00
sha256 = "sha256-DUtaQITzHhQrqA9QJd0U/5EDjH0IzY9/kal/7SYQ/Ck=";
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 \
--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";
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
}