Merge pull request #25565 from KaiHa/nitrokey-app-1.0

nitrokey-app: 0.6.3 -> 1.1
This commit is contained in:
Franz Pletz
2017-05-27 02:43:22 +02:00
committed by GitHub
7 changed files with 78 additions and 36 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -1,29 +1,27 @@
{ 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.1";
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 = "11pz1p5qgghkr5f8s2wg34zqhxk2vq465i73w1h479j88x35rdp0";
};
buildInputs = [
hidapi
libusb1
qt5.qtbase
qt5.qttranslations
];
nativeBuildInputs = [
cmake
pkgconfig
];
patches = [
./FixInstallDestination.patch
./HeaderPath.patch
];
cmakeFlags = "-DHAVE_LIBAPPINDICATOR=NO";
meta = with stdenv.lib; {
description = "Provides extra functionality for the Nitrokey Pro and Storage";
longDescription = ''
@@ -34,6 +32,6 @@ stdenv.mkDerivation rec {
homepage = https://github.com/Nitrokey/nitrokey-app;
repositories.git = https://github.com/Nitrokey/nitrokey-app.git;
license = licenses.gpl3;
maintainer = maintainers.kaiha;
maintainers = with maintainers; [ kaiha fpletz ];
};
}

View File

@@ -0,0 +1,25 @@
{ stdenv, nitrokey-app
, group ? "nitrokey"
}:
stdenv.mkDerivation {
name = "nitrokey-udev-rules";
inherit (nitrokey-app) src;
dontBuild = true;
patchPhase = ''
substituteInPlace data/41-nitrokey.rules --replace plugdev "${group}"
'';
installPhase = ''
mkdir -p $out/etc/udev/rules.d
cp data/41-nitrokey.rules $out/etc/udev/rules.d
'';
meta = {
description = "udev rules for Nitrokeys";
inherit (nitrokey-app.meta) homepage license maintainers;
};
}