at 22.05-pre 40 lines 1.4 kB view raw
1{ lib, stdenv , fetchFromGitHub , python3 , makeWrapper }: 2 3let pythonEnv = python3.withPackages(ps: [ ps.tkinter ps.pyusb ]); 4in stdenv.mkDerivation rec { 5 pname = "fusee-interfacee-tk"; 6 version = "1.0.1"; 7 8 src = fetchFromGitHub { 9 owner = "nh-server"; 10 repo = pname; 11 rev = "V${version}"; 12 sha256 = "0ngwbwsj999flprv14xvhk7lp51nprrvcnlbnbk6y4qx5casm5md"; 13 }; 14 15 nativeBuildInputs = [ makeWrapper ]; 16 buildInputs = [ pythonEnv ]; 17 18 installPhase = '' 19 mkdir -p $out/bin 20 21 # The program isn't just called app, so I'm renaming it based on the repo name 22 # It also isn't a standard program, so we need to append the shebang to the top 23 echo "#!${pythonEnv.interpreter}" > $out/bin/fusee-interfacee-tk 24 cat app.py >> $out/bin/fusee-interfacee-tk 25 chmod +x $out/bin/fusee-interfacee-tk 26 27 # app.py depends on these to run 28 cp *.py $out/bin/ 29 cp intermezzo.bin $out/bin/intermezzo.bin 30 ''; 31 32 meta = with lib; { 33 homepage = "https://github.com/nh-server/fusee-interfacee-tk"; 34 description = "A tool to send .bin files to a Nintendo Switch in RCM mode"; 35 longDescription = "A mod of falquinhos Fusée Launcher for use with Nintendo Homebrew Switch Guide. It also adds the ability to mount SD while in RCM. 36 Must be run as sudo."; 37 maintainers = with maintainers; [ kristian-brucaj ]; 38 license = licenses.gpl2; 39 }; 40}