mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:03:22 +00:00
26 lines
556 B
Nix
26 lines
556 B
Nix
{ stdenv, nitrokey-app
|
|
, group ? "nitrokey"
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "nitrokey-udev-rules-${stdenv.lib.getVersion nitrokey-app}";
|
|
|
|
inherit (nitrokey-app) src;
|
|
|
|
dontBuild = true;
|
|
|
|
patchPhase = ''
|
|
substituteInPlace libnitrokey/data/41-nitrokey.rules --replace plugdev "${group}"
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|