From d4f65c390b08c5bdd0256845c482aec519df82d1 Mon Sep 17 00:00:00 2001 From: Mikael Brockman Date: Thu, 21 Feb 2019 09:33:18 +0200 Subject: [PATCH] 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`. --- pkgs/tools/misc/ipad_charge/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/ipad_charge/default.nix b/pkgs/tools/misc/ipad_charge/default.nix index 9b09fb35cf5..caefcb835a3 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; {