<commit_before>{ stdenv, fetchFromGitHub, pkgconfig, libusb, zlib }:

stdenv.mkDerivation {
  name = "sunxi-tools-20171130";

  src = fetchFromGitHub {
    owner = "linux-sunxi";
    repo = "sunxi-tools";
    rev = "5c1971040c6c44caefb98e371bfca9e18d511da9";
    sha256 = "0qzm515i3dfn82a6sf7372080zb02d365z52bh0b1q711r4dvjgp";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libusb zlib ];

  buildPhase = ''
    make tools misc
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp bin2fex fex2bin phoenix_info sunxi-bootinfo sunxi-fel sunxi-fexc sunxi-nand-image-builder sunxi-nand-part sunxi-pio $out/bin
  '';

  meta = with stdenv.lib; {
    description = "Tools for Allwinner A10 devices";
    homepage = http://linux-sunxi.org/;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ elitak ];
  };
}<commit_msg>sunxi-tools: Use upstream install rule<commit_after>{ stdenv, fetchFromGitHub, pkgconfig, libusb, zlib }:

stdenv.mkDerivation {
  name = "sunxi-tools-20171130";

  src = fetchFromGitHub {
    owner = "linux-sunxi";
    repo = "sunxi-tools";
    rev = "5c1971040c6c44caefb98e371bfca9e18d511da9";
    sha256 = "0qzm515i3dfn82a6sf7372080zb02d365z52bh0b1q711r4dvjgp";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libusb zlib ];

  makeFlags = [ "PREFIX=$(out)" ];

  buildFlags = [ "tools" "misc" ];

  installTargets = [ "install-tools" "install-misc" ];

  meta = with stdenv.lib; {
    description = "Tools for Allwinner A10 devices";
    homepage = http://linux-sunxi.org/;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ elitak ];
  };
}
{'fraction_non_alphanumeric': 0.12507374631268436, 'fraction_numerical': 0.07787610619469026, 'mean_word_length': 3.6465753424657534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4432736', 'n_tokens_mistral': 731, 'n_tokens_neox': 649, 'n_words': 117}