summary refs log tree commit diff
path: root/pkgs/tools/security/nitrokey-app/default.nix
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2018-07-15 21:14:19 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2018-07-15 21:41:46 +0200
commit472ab64e0f8836dfc7c21db389e73507b9e07ffd (patch)
treef7c294fbfb795c00a3b37bc23ade7ba98d51f3f2 /pkgs/tools/security/nitrokey-app/default.nix
parent29da51c8e93df5989eda111e21474404ada72727 (diff)
downloadnixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.tar
nixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.tar.gz
nixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.tar.bz2
nixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.tar.lz
nixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.tar.xz
nixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.tar.zst
nixpkgs-472ab64e0f8836dfc7c21db389e73507b9e07ffd.zip
nitrokey-app: 1.2 -> 1.3.1
Diffstat (limited to 'pkgs/tools/security/nitrokey-app/default.nix')
-rw-r--r--pkgs/tools/security/nitrokey-app/default.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/tools/security/nitrokey-app/default.nix b/pkgs/tools/security/nitrokey-app/default.nix
index 4407d5abbfa..67e388d5728 100644
--- a/pkgs/tools/security/nitrokey-app/default.nix
+++ b/pkgs/tools/security/nitrokey-app/default.nix
@@ -1,29 +1,42 @@
-{ stdenv, bash-completion, cmake, fetchgit, hidapi, libusb1, pkgconfig, qt5 }:
+{ stdenv, makeWrapper, bash-completion, cmake, fetchgit, hidapi, libusb1, pkgconfig
+, qtbase, qttranslations, qtsvg }:
 
 stdenv.mkDerivation rec {
   name = "nitrokey-app-${version}";
-  version = "1.2";
+  version = "1.3.1";
 
   # We use fetchgit instead of fetchFromGitHub because of necessary git submodules
   src = fetchgit {
     url = "https://github.com/Nitrokey/nitrokey-app.git";
     rev = "v${version}";
-    sha256 = "0mm6vlgxlmpahmmcn4awnfpx5rx5bj8m44cywhgxlmz012x73hzi";
+    sha256 = "0zf2f7g5scqd5xfzvmmpvfc7d1w66rf22av0qv6s37875c61j9r9";
   };
 
+  postPatch = ''
+    substituteInPlace libnitrokey/CMakeLists.txt \
+      --replace '/data/41-nitrokey.rules' '/libnitrokey/data/41-nitrokey.rules'
+  '';
+
   buildInputs = [
     bash-completion
     hidapi
     libusb1
-    qt5.qtbase
-    qt5.qttranslations
+    qtbase
+    qttranslations
+    qtsvg
   ];
   nativeBuildInputs = [
     cmake
     pkgconfig
+    makeWrapper
   ];
   cmakeFlags = "-DCMAKE_BUILD_TYPE=Release";
 
+  postFixup = ''
+    wrapProgram $out/bin/nitrokey-app \
+      --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}"
+  '';
+
   meta = with stdenv.lib; {
     description      = "Provides extra functionality for the Nitrokey Pro and Storage";
     longDescription  = ''