571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
46 lines
1.0 KiB
Nix
46 lines
1.0 KiB
Nix
{ 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-4PEZ31QyVOmdhpKqTN8fwcHoLuu+w+OJ3fZeqwlE+io=";
|
|
# On OSX, libnitrokey depends on a custom version of hidapi in a submodule.
|
|
# Monitor https://github.com/Nitrokey/libnitrokey/issues/140 to see if we
|
|
# can remove this extra work one day.
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
})
|