1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00
nixpkgs/pkgs/tools/security/nitrokey-app/udev-rules.nix

26 lines
494 B
Nix
Raw Normal View History

2017-05-24 22:58:33 +01:00
{ stdenv, nitrokey-app
, group ? "nitrokey"
}:
stdenv.mkDerivation {
name = "nitrokey-udev-rules";
inherit (nitrokey-app) src;
dontBuild = true;
patchPhase = ''
substituteInPlace data/41-nitrokey.rules --replace plugdev "${group}"
'';
installPhase = ''
mkdir -p $out/etc/udev/rules.d
cp data/41-nitrokey.rules $out/etc/udev/rules.d
'';
meta = {
description = "udev rules for Nitrokeys";
inherit (nitrokey-app.meta) homepage license maintainers;
};
}