From ba002a4215b91ccad0464c29b10c5cc7a2714261 Mon Sep 17 00:00:00 2001 From: Kai Harries Date: Fri, 5 May 2017 22:15:39 +0200 Subject: nitrokey-app: 0.6.3 -> 1.0 The nitrokey-app is now fetched from git because a submodule is needed for compilation. --- .../nitrokey-app/FixInstallDestination.patch | 11 ----------- pkgs/tools/security/nitrokey-app/HeaderPath.patch | 13 ------------ pkgs/tools/security/nitrokey-app/default.nix | 23 +++++++++++----------- 3 files changed, 12 insertions(+), 35 deletions(-) delete mode 100644 pkgs/tools/security/nitrokey-app/FixInstallDestination.patch delete mode 100644 pkgs/tools/security/nitrokey-app/HeaderPath.patch 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 - - /* 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 = '' -- cgit 1.4.1