lol
at 18.03-beta 40 lines 1.1 kB view raw
1{ stdenv, fetchFromGitHub, libusb1 }: 2 3stdenv.mkDerivation rec { 4 name = "ipad_charge-${version}"; 5 version = "2015-02-03"; 6 7 src = fetchFromGitHub { 8 sha256 = "0f40hqx1dbqpwrhyf42h5982jwqv8j5zp5hwwakz6600hyqvnnz7"; 9 rev = "bb24e1c3a79016cfdffb9d28189485766d655ec6"; 10 repo = "ipad_charge"; 11 owner = "mkorenkov"; 12 }; 13 14 buildInputs = [ libusb1 ]; 15 16 postPatch = '' 17 substituteInPlace Makefile \ 18 --replace " -o root -g root" "" \ 19 --replace "/usr" "$out" 20 sed "/rules\.d/d" -i Makefile 21 ''; 22 23 enableParallelBuilding = true; 24 25 preInstall = '' 26 mkdir -p $out/bin 27 ''; 28 29 meta = with stdenv.lib; { 30 inherit (src.meta) homepage; 31 description = "Apple device USB charging utility for Linux"; 32 longDescription = '' 33 USB charging control utility used to enable/disable charging of an Apple 34 device connected to USB port. For a list of supported devices, see 35 https://github.com/mkorenkov/ipad_charge#supported-devices. 36 ''; 37 license = licenses.gpl2Plus; 38 platforms = platforms.linux; 39 }; 40}