1{
2 mkDerivation, fetchurl, lib,
3 pkgconfig,
4 kcoreaddons, ki18n, kwallet,
5 mksh
6}:
7
8let
9 pname = "kwalletcli";
10 version = "3.01";
11in
12mkDerivation rec {
13 name = "${pname}-${version}";
14
15 src = fetchurl {
16 url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz";
17 sha256 = "03jd7m868dc5dkmm7wbr6dj1h1kp4cb2x8ay8jwvlcbnf7srjzcs";
18 };
19
20 postPatch = ''
21 substituteInPlace GNUmakefile \
22 --replace '-I/usr/include/KF5/KCoreAddons' '-I${kcoreaddons.dev}/include/KF5/KCoreAddons' \
23 --replace '-I/usr/include/KF5/KI18n' '-I${ki18n.dev}/include/KF5/KI18n' \
24 --replace '-I/usr/include/KF5/KWallet' '-I${kwallet.dev}/include/KF5/KWallet' \
25 --replace /usr/bin $out/bin \
26 --replace /usr/share/man $out/share/man
27 '';
28
29 makeFlags = [ "KDE_VER=5" ];
30
31 # we need this when building against qt 5.8+
32 NIX_CFLAGS_COMPILE = [ "-std=c++11" ];
33
34 nativeBuildInputs = [ pkgconfig ];
35 # if using just kwallet, cmake will be added as a buildInput and fail the build
36 propagatedBuildInputs = [ kcoreaddons ki18n (lib.getLib kwallet) ];
37 propagatedUserEnvPkgs = [ mksh ];
38
39 preInstall = ''
40 mkdir -p $out/bin $out/share/man/man1
41 '';
42
43 meta = with lib; {
44 description = "Command-Line Interface to the KDE Wallet";
45 homepage = http://www.mirbsd.org/kwalletcli.htm;
46 license = licenses.miros;
47 maintainers = with maintainers; [ peterhoeg ];
48 };
49}