nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 python3,
6 makeWrapper,
7}:
8
9let
10 pythonEnv = python3.withPackages (ps: [
11 ps.tkinter
12 ps.pyusb
13 ]);
14in
15stdenv.mkDerivation (finalAttrs: {
16 pname = "fusee-interfacee-tk";
17 version = "1.0.1";
18
19 src = fetchFromGitHub {
20 owner = "nh-server";
21 repo = "fusee-interfacee-tk";
22 rev = "V${finalAttrs.version}";
23 sha256 = "0ngwbwsj999flprv14xvhk7lp51nprrvcnlbnbk6y4qx5casm5md";
24 };
25
26 nativeBuildInputs = [ makeWrapper ];
27 buildInputs = [ pythonEnv ];
28
29 installPhase = ''
30 mkdir -p $out/bin
31
32 # The program isn't just called app, so I'm renaming it based on the repo name
33 # It also isn't a standard program, so we need to append the shebang to the top
34 echo "#!${pythonEnv.interpreter}" > $out/bin/fusee-interfacee-tk
35 cat app.py >> $out/bin/fusee-interfacee-tk
36 chmod +x $out/bin/fusee-interfacee-tk
37
38 # app.py depends on these to run
39 cp *.py $out/bin/
40 cp intermezzo.bin $out/bin/intermezzo.bin
41 '';
42
43 meta = {
44 homepage = "https://github.com/nh-server/fusee-interfacee-tk";
45 description = "Tool to send .bin files to a Nintendo Switch in RCM mode";
46 mainProgram = "fusee-interfacee-tk";
47 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.
48 Must be run as sudo.";
49 maintainers = with lib.maintainers; [ kristian-brucaj ];
50 license = lib.licenses.gpl2;
51 };
52})