From 71d37d8535798cfec0311815bb34fc098e77855e Mon Sep 17 00:00:00 2001 From: Nicolas Benes Date: Sat, 25 Mar 2023 14:35:27 +0100 Subject: [PATCH] libnitrokey: init at 3.8 --- .../libraries/libnitrokey/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/libraries/libnitrokey/default.nix diff --git a/pkgs/development/libraries/libnitrokey/default.nix b/pkgs/development/libraries/libnitrokey/default.nix new file mode 100644 index 000000000000..2f06fe8eafba --- /dev/null +++ b/pkgs/development/libraries/libnitrokey/default.nix @@ -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 ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 957ee76bcdde..dfaa75b3f089 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21594,6 +21594,8 @@ with pkgs; libnice = callPackage ../development/libraries/libnice { }; + libnitrokey = callPackage ../development/libraries/libnitrokey { }; + libnsl = callPackage ../development/libraries/libnsl { }; liboping = callPackage ../development/libraries/liboping { };