ipad_charge: enable installation udev rules

Note that you need to add this package to your
`services.udev.packages` list rather than your
`environment.systemPackages` for the udev rules to take effect.

It might be worthwhile giving this its own configuration option, which
could be documented in `man configuration.nix`.
This commit is contained in:
Mikael Brockman 2019-02-21 09:33:18 +02:00
parent de2bb1094b
commit d4f65c390b
No known key found for this signature in database
GPG Key ID: 9B684C2FBFB1F16D

View File

@ -16,14 +16,16 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace Makefile \
--replace " -o root -g root" "" \
--replace "/usr" "$out" \
--replace "/etc/udev" "$out/lib/udev"
substituteInPlace *.rules \
--replace "/usr" "$out"
sed "/rules\.d/d" -i Makefile
'';
enableParallelBuilding = true;
preInstall = ''
mkdir -p $out/bin
mkdir -p $out/{bin,lib/udev/rules.d}
'';
meta = with stdenv.lib; {