nixpkgs/pkgs/applications/misc/fusee-interfacee-tk/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

41 lines
1.3 KiB
Nix

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