<commit_before>{ stdenv, fetchFromGitHub, libusb1 }:

stdenv.mkDerivation rec {
  name = "ipad_charge-${version}";
  version = "2015-02-03";

  src = fetchFromGitHub {
    sha256 = "0f40hqx1dbqpwrhyf42h5982jwqv8j5zp5hwwakz6600hyqvnnz7";
    rev = "bb24e1c3a79016cfdffb9d28189485766d655ec6";
    repo = "ipad_charge";
    owner = "mkorenkov";
  };

  buildInputs = [ libusb1 ];

  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 (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.
    '';<commit_msg>ipad_charge: enable installation udev rules<commit_after>{ stdenv, fetchFromGitHub, libusb1 }:

stdenv.mkDerivation rec {
  name = "ipad_charge-${version}";
  version = "2015-02-03";

  src = fetchFromGitHub {
    sha256 = "0f40hqx1dbqpwrhyf42h5982jwqv8j5zp5hwwakz6600hyqvnnz7";
    rev = "bb24e1c3a79016cfdffb9d28189485766d655ec6";
    repo = "ipad_charge";
    owner = "mkorenkov";
  };

  buildInputs = [ libusb1 ];

  postPatch = ''
    substituteInPlace Makefile \
      --replace " -o root -g root" "" \
      --replace "/usr" "$out" \
      --replace "/etc/udev" "$out/lib/udev"
    substituteInPlace *.rules \
      --replace "/usr" "$out"
  '';

  enableParallelBuilding = true;

  preInstall = ''
    mkdir -p $out/{bin,lib/udev/rules.d}
  '';

  meta = with stdenv.lib; {
    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.
    '';
{'fraction_non_alphanumeric': 0.12295465170640486, 'fraction_numerical': 0.05236091631603553, 'mean_word_length': 3.0761904761904764, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4655369', 'n_tokens_mistral': 821, 'n_tokens_neox': 757, 'n_words': 172}