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