about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorKai Harries <kai.harries@gmail.com>2017-05-05 22:15:39 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2017-05-26 00:42:38 +0200
commitba002a4215b91ccad0464c29b10c5cc7a2714261 (patch)
tree2110ec4968a2f9d521ebd07bbca87d44d67ad146 /pkgs/tools
parentf0c08e3cd43e81fb3845dfcc79ca8e03dc8c2de1 (diff)
downloadnixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.tar
nixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.tar.gz
nixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.tar.bz2
nixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.tar.lz
nixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.tar.xz
nixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.tar.zst
nixlib-ba002a4215b91ccad0464c29b10c5cc7a2714261.zip
nitrokey-app: 0.6.3 -> 1.0
The nitrokey-app is now fetched from git because a submodule is needed
for compilation.
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/security/nitrokey-app/FixInstallDestination.patch11
-rw-r--r--pkgs/tools/security/nitrokey-app/HeaderPath.patch13
-rw-r--r--pkgs/tools/security/nitrokey-app/default.nix23
3 files changed, 12 insertions, 35 deletions
diff --git a/pkgs/tools/security/nitrokey-app/FixInstallDestination.patch b/pkgs/tools/security/nitrokey-app/FixInstallDestination.patch
deleted file mode 100644
index 7acd7239b392..000000000000
--- a/pkgs/tools/security/nitrokey-app/FixInstallDestination.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -273,7 +273,7 @@
-   # Install autocompletion scripts
-   install(FILES
-    ${CMAKE_SOURCE_DIR}/data/bash-autocomplete/nitrokey-app
--    DESTINATION /etc/bash_completion.d
-+    DESTINATION etc/bash_completion.d
-   )
- 
-   install(FILES
diff --git a/pkgs/tools/security/nitrokey-app/HeaderPath.patch b/pkgs/tools/security/nitrokey-app/HeaderPath.patch
deleted file mode 100644
index 695b7559116c..000000000000
--- a/pkgs/tools/security/nitrokey-app/HeaderPath.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/utils/hid_libusb.c b/src/utils/hid_libusb.c
-index bd8c14e..537292d 100644
---- a/src/utils/hid_libusb.c
-+++ b/src/utils/hid_libusb.c
-@@ -44,7 +44,7 @@
- #include <wchar.h>
- 
- /* GNU / LibUSB */
--#include "libusb.h"
-+#include "libusb-1.0/libusb.h"
- #include "iconv.h"
- 
- #include "hidapi.h"
diff --git a/pkgs/tools/security/nitrokey-app/default.nix b/pkgs/tools/security/nitrokey-app/default.nix
index 5e1baa4f57bf..39504e0b4f5b 100644
--- a/pkgs/tools/security/nitrokey-app/default.nix
+++ b/pkgs/tools/security/nitrokey-app/default.nix
@@ -1,29 +1,30 @@
-{ stdenv, cmake, fetchFromGitHub, libusb1, pkgconfig, qt5 }:
+{ stdenv, cmake, fetchgit, hidapi, libusb1, pkgconfig, qt5 }:
 
 stdenv.mkDerivation rec {
   name = "nitrokey-app";
-  version = "0.6.3";
+  version = "1.0";
 
-  src = fetchFromGitHub {
-    owner = "Nitrokey";
-    repo = "nitrokey-app";
-    rev = "v${version}";
-    sha256 = "1l5l4lwxmyd3jrafw19g12sfc42nd43sv7h7i4krqxnkk6gfx11q";
+  src = fetchgit {
+    url = "https://github.com/Nitrokey/nitrokey-app.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "0i910d1xrl4bfrg5ifkj3w4dp31igaxncy2yf97y4rsc8094bcb1";
   };
 
   buildInputs = [
+    hidapi
     libusb1
     qt5.qtbase
+    qt5.qttranslations
   ];
   nativeBuildInputs = [
     cmake
     pkgconfig
   ];
-  patches = [
-     ./FixInstallDestination.patch
-     ./HeaderPath.patch
-  ];
   cmakeFlags = "-DHAVE_LIBAPPINDICATOR=NO";
+  postPatch = ''
+    substituteInPlace CMakeLists.txt --replace 'DESTINATION ''${UDEV_MAIN_DIR}' 'DESTINATION lib/udev/rules.d'
+    substituteInPlace data/41-nitrokey.rules --replace 'plugdev' 'wheel'
+    '';
   meta = with stdenv.lib; {
     description      = "Provides extra functionality for the Nitrokey Pro and Storage";
     longDescription  = ''