2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv , fetchFromGitHub , python3 , makeWrapper }:
|
2020-02-03 00:43:52 +00:00
|
|
|
|
2021-01-01 13:46:40 +00:00
|
|
|
let pythonEnv = python3.withPackages(ps: [ ps.tkinter ps.pyusb ]);
|
|
|
|
in stdenv.mkDerivation rec {
|
2020-02-03 00:43:52 +00:00
|
|
|
pname = "fusee-interfacee-tk";
|
2020-04-01 12:01:04 +00:00
|
|
|
version = "1.0.1";
|
2020-02-03 00:43:52 +00:00
|
|
|
|
2021-01-01 13:46:40 +00:00
|
|
|
src = fetchFromGitHub {
|
2020-02-03 00:43:52 +00:00
|
|
|
owner = "nh-server";
|
|
|
|
repo = pname;
|
2021-01-01 13:46:40 +00:00
|
|
|
rev = "V${version}";
|
2020-04-01 12:01:04 +00:00
|
|
|
sha256 = "0ngwbwsj999flprv14xvhk7lp51nprrvcnlbnbk6y4qx5casm5md";
|
2020-02-03 00:43:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ pythonEnv ];
|
|
|
|
|
2021-01-01 13:46:40 +00:00
|
|
|
installPhase = ''
|
2020-02-03 00:43:52 +00:00
|
|
|
mkdir -p $out/bin
|
2021-01-01 13:46:40 +00:00
|
|
|
|
|
|
|
# The program isn't just called app, so I'm renaming it based on the repo name
|
2020-02-03 00:43:52 +00:00
|
|
|
# It also isn't a standard program, so we need to append the shebang to the top
|
2021-01-01 13:46:40 +00:00
|
|
|
echo "#!${pythonEnv.interpreter}" > $out/bin/fusee-interfacee-tk
|
2020-02-03 00:43:52 +00:00
|
|
|
cat app.py >> $out/bin/fusee-interfacee-tk
|
2021-01-01 13:46:40 +00:00
|
|
|
chmod +x $out/bin/fusee-interfacee-tk
|
|
|
|
|
|
|
|
# app.py depends on these to run
|
|
|
|
cp *.py $out/bin/
|
2020-02-03 00:43:52 +00:00
|
|
|
cp intermezzo.bin $out/bin/intermezzo.bin
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-02-03 00:43:52 +00:00
|
|
|
homepage = "https://github.com/nh-server/fusee-interfacee-tk";
|
|
|
|
description = "A tool to send .bin files to a Nintendo Switch in RCM mode";
|
2021-01-01 13:46:40 +00:00
|
|
|
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.
|
2020-02-03 00:43:52 +00:00
|
|
|
Must be run as sudo.";
|
|
|
|
maintainers = with maintainers; [ kristian-brucaj ];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
2021-01-01 13:46:40 +00:00
|
|
|
}
|