about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMikael Brockman <mikael@brockman.se>2019-02-21 09:33:18 +0200
committerMikael Brockman <mikael@brockman.se>2019-02-21 09:33:18 +0200
commitd4f65c390b08c5bdd0256845c482aec519df82d1 (patch)
treee0258488b45a2f74b380f4b0c0939e296b64d1bb /pkgs
parentde2bb1094b7213d0604dc1d978dd1edd209c653e (diff)
downloadnixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.tar
nixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.tar.gz
nixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.tar.bz2
nixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.tar.lz
nixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.tar.xz
nixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.tar.zst
nixlib-d4f65c390b08c5bdd0256845c482aec519df82d1.zip
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`.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/misc/ipad_charge/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/tools/misc/ipad_charge/default.nix b/pkgs/tools/misc/ipad_charge/default.nix
index 9b09fb35cf5a..caefcb835a3f 100644
--- a/pkgs/tools/misc/ipad_charge/default.nix
+++ b/pkgs/tools/misc/ipad_charge/default.nix
@@ -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; {