Merge pull request #223242 from panicgh/nitrokey-libnitrokey

libnitrokey: init at 3.8

authored by

Ryan Lahfa and committed by
GitHub
16f67c4a f39c23ad

+101 -36
+1 -1
nixos/modules/hardware/nitrokey.nix
··· 22 22 }; 23 23 24 24 config = mkIf cfg.enable { 25 - services.udev.packages = [ pkgs.nitrokey-udev-rules ]; 25 + services.udev.packages = [ pkgs.libnitrokey ]; 26 26 }; 27 27 }
+31
pkgs/development/libraries/cppcodec/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + }: 6 + 7 + stdenv.mkDerivation (finalAttrs: { 8 + pname = "cppcodec"; 9 + version = "0.2"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "tplgy"; 13 + repo = finalAttrs.pname; 14 + rev = "v${finalAttrs.version}"; 15 + hash = "sha256-k4EACtDOSkTXezTeFtVdM1EVJjvGga/IQSrvDzhyaXw="; 16 + }; 17 + 18 + nativeBuildInputs = [ cmake ]; 19 + 20 + meta = with lib; { 21 + description = "Header-only C++11 library for encode/decode functions as in RFC 4648"; 22 + longDescription = '' 23 + Header-only C++11 library to encode/decode base64, base64url, base32, 24 + base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus 25 + Crockford's base32. 26 + ''; 27 + homepage = "https://github.com/tplgy/cppcodec"; 28 + license = licenses.mit; 29 + maintainers = with maintainers; [ panicgh raitobezarius ]; 30 + }; 31 + })
+41
pkgs/development/libraries/libnitrokey/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , cmake 5 + , pkg-config 6 + , hidapi 7 + , libusb1 8 + }: 9 + 10 + stdenv.mkDerivation (finalAttrs: { 11 + pname = "libnitrokey"; 12 + version = "3.8"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "Nitrokey"; 16 + repo = "libnitrokey"; 17 + rev = "v${finalAttrs.version}"; 18 + hash = "sha256-9ZMR1g04gNzslax6NpD6KykfUfjpKFIizaMMn06iJa0="; 19 + }; 20 + 21 + nativeBuildInputs = [ 22 + cmake 23 + pkg-config 24 + ]; 25 + 26 + cmakeFlags = [ 27 + "-DADD_GIT_INFO=OFF" 28 + "-DCMAKE_INSTALL_UDEVRULESDIR=etc/udev/rules.d" 29 + ]; 30 + 31 + buildInputs = [ libusb1 ]; 32 + 33 + propagatedBuildInputs = [ hidapi ]; 34 + 35 + meta = with lib; { 36 + description = "Communicate with Nitrokey devices in a clean and easy manner"; 37 + homepage = "https://github.com/Nitrokey/libnitrokey"; 38 + license = licenses.lgpl3; 39 + maintainers = with maintainers; [ panicgh raitobezarius ]; 40 + }; 41 + })
+23 -14
pkgs/tools/security/nitrokey-app/default.nix
··· 1 - { lib, stdenv, bash-completion, cmake, fetchFromGitHub, hidapi, libusb1, pkg-config 2 - , qtbase, qttranslations, qtsvg, wrapQtAppsHook }: 1 + { lib 2 + , stdenv 3 + , cmake 4 + , fetchFromGitHub 5 + , pkg-config 6 + , qttranslations 7 + , wrapQtAppsHook 8 + , libnitrokey 9 + , cppcodec 10 + }: 3 11 4 12 stdenv.mkDerivation rec { 5 13 pname = "nitrokey-app"; ··· 9 17 owner = "Nitrokey"; 10 18 repo = "nitrokey-app"; 11 19 rev = "v${version}"; 12 - sha256 = "1k0w921hfrya4q2r7bqn7kgmwvwb7c15k9ymlbnksmfc9yyjyfcv"; 13 - fetchSubmodules = true; 20 + hash = "sha256-c6EC5uuMna07xVHDRFq0UDwuSeopZTmZGZ9ZD5zaq8Y="; 14 21 }; 15 22 16 - buildInputs = [ 17 - bash-completion 18 - hidapi 19 - libusb1 20 - qtbase 21 - qttranslations 22 - qtsvg 23 - ]; 24 23 nativeBuildInputs = [ 25 24 cmake 26 25 pkg-config 27 26 wrapQtAppsHook 27 + qttranslations 28 28 ]; 29 - cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ]; 29 + 30 + cmakeFlags = [ 31 + "-DADD_GIT_INFO=OFF" 32 + "-DBASH_COMPLETION_PATH=share/bash-completion/completions" 33 + ]; 34 + 35 + buildInputs = [ 36 + libnitrokey 37 + cppcodec 38 + ]; 30 39 31 40 meta = with lib; { 32 41 description = "Provides extra functionality for the Nitrokey Pro and Storage"; ··· 37 46 ''; 38 47 homepage = "https://github.com/Nitrokey/nitrokey-app"; 39 48 license = licenses.gpl3; 40 - maintainers = with maintainers; [ kaiha ]; 49 + maintainers = with maintainers; [ kaiha panicgh ]; 41 50 }; 42 51 }
-20
pkgs/tools/security/nitrokey-app/udev-rules.nix
··· 1 - { lib, stdenv, nitrokey-app }: 2 - 3 - 4 - stdenv.mkDerivation { 5 - name = "nitrokey-udev-rules-${lib.getVersion nitrokey-app}"; 6 - 7 - inherit (nitrokey-app) src; 8 - 9 - dontBuild = true; 10 - 11 - installPhase = '' 12 - mkdir -p $out/etc/udev/rules.d 13 - cp libnitrokey/data/41-nitrokey.rules $out/etc/udev/rules.d 14 - ''; 15 - 16 - meta = { 17 - description = "udev rules for Nitrokeys"; 18 - inherit (nitrokey-app.meta) homepage license maintainers; 19 - }; 20 - }
+1
pkgs/top-level/aliases.nix
··· 1073 1073 nfsUtils = throw "'nfsUtils' has been renamed to/replaced by 'nfs-utils'"; # Converted to throw 2022-02-22 1074 1074 nginxUnstable = throw "'nginxUnstable' has been renamed to/replaced by 'nginxMainline'"; # Converted to throw 2022-02-22 1075 1075 nilfs_utils = throw "'nilfs_utils' has been renamed to/replaced by 'nilfs-utils'"; # Converted to throw 2022-02-22 1076 + nitrokey-udev-rules = libnitrokey; # Added 2023-03-25 1076 1077 nix-direnv-flakes = nix-direnv; 1077 1078 nix-review = nixpkgs-review; # Added 2019-12-22 1078 1079 nixFlakes = nixVersions.stable; # Added 2021-05-21
+4 -1
pkgs/top-level/all-packages.nix
··· 19608 19608 19609 19609 cppcms = callPackage ../development/libraries/cppcms { }; 19610 19610 19611 + cppcodec = callPackage ../development/libraries/cppcodec { }; 19612 + 19611 19613 cppunit = callPackage ../development/libraries/cppunit { }; 19612 19614 19613 19615 cpputest = callPackage ../development/libraries/cpputest { }; ··· 21610 21612 libnfs = callPackage ../development/libraries/libnfs { }; 21611 21613 21612 21614 libnice = callPackage ../development/libraries/libnice { }; 21615 + 21616 + libnitrokey = callPackage ../development/libraries/libnitrokey { }; 21613 21617 21614 21618 libnsl = callPackage ../development/libraries/libnsl { }; 21615 21619 ··· 39309 39313 pynitrokey = callPackage ../tools/security/pynitrokey { }; 39310 39314 39311 39315 nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { }; 39312 - nitrokey-udev-rules = callPackage ../tools/security/nitrokey-app/udev-rules.nix { }; 39313 39316 39314 39317 fpm2 = callPackage ../tools/security/fpm2 { }; 39315 39318