mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-14 05:29:20 +03:00
Merge pull request #223242 from panicgh/nitrokey-libnitrokey
libnitrokey: init at 3.8
This commit is contained in:
commit
16f67c4afc
7 changed files with 101 additions and 36 deletions
|
@ -22,6 +22,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
|
services.udev.packages = [ pkgs.libnitrokey ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
31
pkgs/development/libraries/cppcodec/default.nix
Normal file
31
pkgs/development/libraries/cppcodec/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "cppcodec";
|
||||||
|
version = "0.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "tplgy";
|
||||||
|
repo = finalAttrs.pname;
|
||||||
|
rev = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-k4EACtDOSkTXezTeFtVdM1EVJjvGga/IQSrvDzhyaXw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Header-only C++11 library for encode/decode functions as in RFC 4648";
|
||||||
|
longDescription = ''
|
||||||
|
Header-only C++11 library to encode/decode base64, base64url, base32,
|
||||||
|
base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus
|
||||||
|
Crockford's base32.
|
||||||
|
'';
|
||||||
|
homepage = "https://github.com/tplgy/cppcodec";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ panicgh raitobezarius ];
|
||||||
|
};
|
||||||
|
})
|
41
pkgs/development/libraries/libnitrokey/default.nix
Normal file
41
pkgs/development/libraries/libnitrokey/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, hidapi
|
||||||
|
, libusb1
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "libnitrokey";
|
||||||
|
version = "3.8";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Nitrokey";
|
||||||
|
repo = "libnitrokey";
|
||||||
|
rev = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-9ZMR1g04gNzslax6NpD6KykfUfjpKFIizaMMn06iJa0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DADD_GIT_INFO=OFF"
|
||||||
|
"-DCMAKE_INSTALL_UDEVRULESDIR=etc/udev/rules.d"
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [ libusb1 ];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ hidapi ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Communicate with Nitrokey devices in a clean and easy manner";
|
||||||
|
homepage = "https://github.com/Nitrokey/libnitrokey";
|
||||||
|
license = licenses.lgpl3;
|
||||||
|
maintainers = with maintainers; [ panicgh raitobezarius ];
|
||||||
|
};
|
||||||
|
})
|
|
@ -1,5 +1,13 @@
|
||||||
{ lib, stdenv, bash-completion, cmake, fetchFromGitHub, hidapi, libusb1, pkg-config
|
{ lib
|
||||||
, qtbase, qttranslations, qtsvg, wrapQtAppsHook }:
|
, stdenv
|
||||||
|
, cmake
|
||||||
|
, fetchFromGitHub
|
||||||
|
, pkg-config
|
||||||
|
, qttranslations
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, libnitrokey
|
||||||
|
, cppcodec
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nitrokey-app";
|
pname = "nitrokey-app";
|
||||||
|
@ -9,24 +17,25 @@ stdenv.mkDerivation rec {
|
||||||
owner = "Nitrokey";
|
owner = "Nitrokey";
|
||||||
repo = "nitrokey-app";
|
repo = "nitrokey-app";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1k0w921hfrya4q2r7bqn7kgmwvwb7c15k9ymlbnksmfc9yyjyfcv";
|
hash = "sha256-c6EC5uuMna07xVHDRFq0UDwuSeopZTmZGZ9ZD5zaq8Y=";
|
||||||
fetchSubmodules = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
bash-completion
|
|
||||||
hidapi
|
|
||||||
libusb1
|
|
||||||
qtbase
|
|
||||||
qttranslations
|
|
||||||
qtsvg
|
|
||||||
];
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
|
qttranslations
|
||||||
|
];
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DADD_GIT_INFO=OFF"
|
||||||
|
"-DBASH_COMPLETION_PATH=share/bash-completion/completions"
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libnitrokey
|
||||||
|
cppcodec
|
||||||
];
|
];
|
||||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Provides extra functionality for the Nitrokey Pro and Storage";
|
description = "Provides extra functionality for the Nitrokey Pro and Storage";
|
||||||
|
@ -37,6 +46,6 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/Nitrokey/nitrokey-app";
|
homepage = "https://github.com/Nitrokey/nitrokey-app";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = with maintainers; [ kaiha ];
|
maintainers = with maintainers; [ kaiha panicgh ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ lib, stdenv, nitrokey-app }:
|
|
||||||
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "nitrokey-udev-rules-${lib.getVersion nitrokey-app}";
|
|
||||||
|
|
||||||
inherit (nitrokey-app) src;
|
|
||||||
|
|
||||||
dontBuild = true;
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/etc/udev/rules.d
|
|
||||||
cp libnitrokey/data/41-nitrokey.rules $out/etc/udev/rules.d
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "udev rules for Nitrokeys";
|
|
||||||
inherit (nitrokey-app.meta) homepage license maintainers;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1073,6 +1073,7 @@ mapAliases ({
|
||||||
nfsUtils = throw "'nfsUtils' has been renamed to/replaced by 'nfs-utils'"; # Converted to throw 2022-02-22
|
nfsUtils = throw "'nfsUtils' has been renamed to/replaced by 'nfs-utils'"; # Converted to throw 2022-02-22
|
||||||
nginxUnstable = throw "'nginxUnstable' has been renamed to/replaced by 'nginxMainline'"; # Converted to throw 2022-02-22
|
nginxUnstable = throw "'nginxUnstable' has been renamed to/replaced by 'nginxMainline'"; # Converted to throw 2022-02-22
|
||||||
nilfs_utils = throw "'nilfs_utils' has been renamed to/replaced by 'nilfs-utils'"; # Converted to throw 2022-02-22
|
nilfs_utils = throw "'nilfs_utils' has been renamed to/replaced by 'nilfs-utils'"; # Converted to throw 2022-02-22
|
||||||
|
nitrokey-udev-rules = libnitrokey; # Added 2023-03-25
|
||||||
nix-direnv-flakes = nix-direnv;
|
nix-direnv-flakes = nix-direnv;
|
||||||
nix-review = nixpkgs-review; # Added 2019-12-22
|
nix-review = nixpkgs-review; # Added 2019-12-22
|
||||||
nixFlakes = nixVersions.stable; # Added 2021-05-21
|
nixFlakes = nixVersions.stable; # Added 2021-05-21
|
||||||
|
|
|
@ -19608,6 +19608,8 @@ with pkgs;
|
||||||
|
|
||||||
cppcms = callPackage ../development/libraries/cppcms { };
|
cppcms = callPackage ../development/libraries/cppcms { };
|
||||||
|
|
||||||
|
cppcodec = callPackage ../development/libraries/cppcodec { };
|
||||||
|
|
||||||
cppunit = callPackage ../development/libraries/cppunit { };
|
cppunit = callPackage ../development/libraries/cppunit { };
|
||||||
|
|
||||||
cpputest = callPackage ../development/libraries/cpputest { };
|
cpputest = callPackage ../development/libraries/cpputest { };
|
||||||
|
@ -21611,6 +21613,8 @@ with pkgs;
|
||||||
|
|
||||||
libnice = callPackage ../development/libraries/libnice { };
|
libnice = callPackage ../development/libraries/libnice { };
|
||||||
|
|
||||||
|
libnitrokey = callPackage ../development/libraries/libnitrokey { };
|
||||||
|
|
||||||
libnsl = callPackage ../development/libraries/libnsl { };
|
libnsl = callPackage ../development/libraries/libnsl { };
|
||||||
|
|
||||||
liboping = callPackage ../development/libraries/liboping { };
|
liboping = callPackage ../development/libraries/liboping { };
|
||||||
|
@ -39309,7 +39313,6 @@ with pkgs;
|
||||||
pynitrokey = callPackage ../tools/security/pynitrokey { };
|
pynitrokey = callPackage ../tools/security/pynitrokey { };
|
||||||
|
|
||||||
nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { };
|
nitrokey-app = libsForQt5.callPackage ../tools/security/nitrokey-app { };
|
||||||
nitrokey-udev-rules = callPackage ../tools/security/nitrokey-app/udev-rules.nix { };
|
|
||||||
|
|
||||||
fpm2 = callPackage ../tools/security/fpm2 { };
|
fpm2 = callPackage ../tools/security/fpm2 { };
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue