nixpkgs/pkgs/tools/security/kwalletcli/default.nix

50 lines
1.6 KiB
Nix
Raw Normal View History

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