depot/third_party/nixpkgs/pkgs/tools/security/nitrokey-app/udev-rules.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

25 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;
};
}