biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / fusee-launcher / default.nix
blob776f5c064aefb28bf5759bb977fea48d3934cc96
1 { lib, stdenv
2 , python3Packages
3 , python3
4 , fetchFromGitHub
5 , pkgsCross
6 , makeWrapper
7 } :
9 let
10   arm-embedded-cc = pkgsCross.arm-embedded.buildPackages.gcc;
13 stdenv.mkDerivation {
14   pname = "fusee-launcher";
15   version = "unstable-2018-07-14";
17   src = fetchFromGitHub {
18     owner = "Cease-and-DeSwitch";
19     repo = "fusee-launcher";
20     rev = "265e8f3e1987751ec41db6f1946d132b296aba43";
21     sha256 = "1pqkgw5bk0xcz9x7pc1f0r0b9nsc8jnnvcs1315d8ml8mx23fshm";
22   };
24   makeFlags = [
25     "CROSS_COMPILE=${arm-embedded-cc.targetPrefix}"
26   ];
28   installPhase = ''
29     mkdir -p $out/bin $out/share
30     cp fusee-launcher.py $out/bin/fusee-launcher
31     cp intermezzo.bin $out/share/intermezzo.bin
33     # Wrap with path to intermezzo.bin relocator binary in /share
34     wrapProgram $out/bin/fusee-launcher \
35       --add-flags "--relocator $out/share/intermezzo.bin" \
36       --prefix PYTHONPATH : "$PYTHONPATH:$(toPythonPath $out)"
37   '';
39   nativeBuildInputs = [ arm-embedded-cc makeWrapper python3Packages.wrapPython ];
40   buildInputs = [ python3 python3Packages.pyusb ];
41   pythonPath = with python3Packages; [ pyusb ];
43   meta = with lib; {
44     homepage = "https://github.com/Cease-and-DeSwitch/fusee-launcher";
45     description = "Work-in-progress launcher for one of the Tegra X1 bootROM exploits";
46     mainProgram = "fusee-launcher";
47     license = licenses.gpl2;
48     maintainers = with maintainers; [ pneumaticat ];
49   };