summary refs log tree commit diff
path: root/pkgs/tools/security/kwalletcli
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-06-01 19:11:21 +0800
committerPeter Hoeg <peter@hoeg.com>2017-06-01 19:11:30 +0800
commitef77b61f75c9f599c71f9bb69eef71c5326b0978 (patch)
tree291840a6aecfd122992b4783c757e0ebe91ee55d /pkgs/tools/security/kwalletcli
parentbb21e5356f26dbeb9810189e902352457f263b47 (diff)
downloadnixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.tar
nixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.tar.gz
nixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.tar.bz2
nixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.tar.lz
nixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.tar.xz
nixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.tar.zst
nixpkgs-ef77b61f75c9f599c71f9bb69eef71c5326b0978.zip
kwalletcli: init at 3.00
Diffstat (limited to 'pkgs/tools/security/kwalletcli')
-rw-r--r--pkgs/tools/security/kwalletcli/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/security/kwalletcli/default.nix b/pkgs/tools/security/kwalletcli/default.nix
new file mode 100644
index 00000000000..c6217024f1b
--- /dev/null
+++ b/pkgs/tools/security/kwalletcli/default.nix
@@ -0,0 +1,55 @@
+{
+  kdeDerivation, kdeWrapper, fetchurl, lib,
+  pkgconfig,
+  kcoreaddons, ki18n, kwallet,
+  mksh
+}:
+
+let
+  pname = "kwalletcli";
+  version = "3.00";
+
+  unwrapped = kdeDerivation rec {
+    name = "${pname}-${version}";
+
+    src = fetchurl {
+      url = "https://www.mirbsd.org/MirOS/dist/hosted/kwalletcli/${name}.tar.gz";
+      sha256 = "1q87nm7pkmgvkrml6hgbmv0ddx3871w7x86gn90sjc3vw59qfh98";
+    };
+
+    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
+    '';
+
+    makeFlags = [ "KDE_VER=5" ];
+
+    # we need this when building against qt 5.8+
+    NIX_CFLAGS_COMPILE = [ "-std=c++11" ];
+
+    nativeBuildInputs = [ pkgconfig ];
+    # 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
+    '';
+
+    meta = with lib; {
+      description = "Command-Line Interface to the KDE Wallet";
+      homepage = http://www.mirbsd.org/kwalletcli.htm;
+      license = licenses.miros;
+      maintainers = with maintainers; [ peterhoeg ];
+    };
+  };
+
+in kdeWrapper {
+  inherit unwrapped;
+  targets = map (b: "bin/" + b)
+    [ "kwalletaskpass" "kwalletcli" "kwalletcli_getpin" "pinentry-kwallet" ];
+  paths = [ mksh ];
+}