1 { lib, stdenv, fetchFromGitHub, libusb1 }:
3 stdenv.mkDerivation rec {
5 version = "2015-02-03";
7 src = fetchFromGitHub {
8 sha256 = "0f40hqx1dbqpwrhyf42h5982jwqv8j5zp5hwwakz6600hyqvnnz7";
9 rev = "bb24e1c3a79016cfdffb9d28189485766d655ec6";
14 buildInputs = [ libusb1 ];
17 substituteInPlace Makefile \
18 --replace " -o root -g root" "" \
19 --replace "/usr" "$out" \
20 --replace "/etc/udev" "$out/lib/udev"
21 substituteInPlace *.rules \
22 --replace "/usr" "$out"
25 enableParallelBuilding = true;
28 mkdir -p $out/{bin,lib/udev/rules.d}
32 inherit (src.meta) homepage;
33 description = "Apple device USB charging utility for Linux";
35 USB charging control utility used to enable/disable charging of an Apple
36 device connected to USB port. For a list of supported devices, see
37 https://github.com/mkorenkov/ipad_charge#supported-devices.
39 license = licenses.gpl2Plus;
40 platforms = platforms.linux;
41 mainProgram = "ipad_charge";