summary refs log tree commit diff
path: root/pkgs/development/tools/sunxi-tools/default.nix
blob: 59252a938637f3b634216d095a8aab7c356c98d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchFromGitHub, pkgconfig, libusb }:

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

  src = fetchFromGitHub {
    owner = "linux-sunxi";
    repo = "sunxi-tools";
    rev = "be1b4c7400161b90437432076360c1f99970f54f";
    sha256 = "02pqaaahra4wbv325264qh5i17mxwicmjx9nm33nw2dpmfmg9xhr";
  };

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

  buildPhase = ''
    make all misc
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp bin2fex fex2bin phoenix_info sunxi-bootinfo sunxi-fel sunxi-fexc 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 ];
  };
}