summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-08-03 01:45:13 +0200
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-08-03 01:45:13 +0200
commit9cd4763e9c6aafe71cccee24fee51dea8242b449 (patch)
tree2e737ba76465fd99acbe1b2fb8bae58157faaca4
parent87853e7753cbbc0d4c3801a398fb1377aedce174 (diff)
downloadnixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.tar
nixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.tar.gz
nixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.tar.bz2
nixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.tar.lz
nixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.tar.xz
nixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.tar.zst
nixlib-9cd4763e9c6aafe71cccee24fee51dea8242b449.zip
ipad_charge: init at 2015-02-03
-rw-r--r--pkgs/tools/misc/ipad_charge/default.nix42
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/tools/misc/ipad_charge/default.nix b/pkgs/tools/misc/ipad_charge/default.nix
new file mode 100644
index 000000000000..df987ed86c1c
--- /dev/null
+++ b/pkgs/tools/misc/ipad_charge/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, libusb }:
+
+let version = "2015-02-03"; in
+stdenv.mkDerivation rec {
+  name = "ipad_charge-${version}";
+
+  src = fetchFromGitHub {
+    sha256 = "0f40hqx1dbqpwrhyf42h5982jwqv8j5zp5hwwakz6600hyqvnnz7";
+    rev = "bb24e1c3a79016cfdffb9d28189485766d655ec6";
+    repo = "ipad_charge";
+    owner = "mkorenkov";
+  };
+
+  buildInputs = [ libusb ];
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace " -o root -g root" "" \
+      --replace "/usr" "$out"
+    sed "/rules\.d/d" -i Makefile
+  '';
+
+  enableParallelBuilding = true;
+
+  preInstall = ''
+    mkdir -p $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    inherit version;
+    inherit (src.meta) homepage;
+    description = "Apple device USB charging utility for Linux";
+    longDescription = ''
+      USB charging control utility used to enable/disable charging of an Apple
+      device connected to USB port. For a list of supported devices, see
+      https://github.com/mkorenkov/ipad_charge#supported-devices.
+    '';
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ nckx ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8c0a818b38fd..216f1bb6463d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1918,6 +1918,8 @@ let
 
   iodine = callPackage ../tools/networking/iodine { };
 
+  ipad_charge = callPackage ../tools/misc/ipad_charge { };
+
   iperf2 = callPackage ../tools/networking/iperf/2.nix { };
   iperf3 = callPackage ../tools/networking/iperf/3.nix { };
   iperf = iperf3;