11 pkgDescription = "All-in-one tool for managing Nintendo Switch homebrew";
14 attrs.${stdenv.hostPlatform.system}
15 or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
17 jreWithJavaFX = jre.override { enableJavaFX = true; };
19 maven.buildMavenPackage rec {
20 pname = "ns-usbloader";
23 src = fetchFromGitHub {
24 owner = "developersu";
25 repo = "ns-usbloader";
27 sha256 = "sha256-x4zGwsDUVUHI4AUMPSqgnZVyZx+pWQA5xvtrFE8U3QU=";
30 patches = [ ./no-launch4j.patch ./make-deterministic.patch ];
32 # JavaFX pulls in architecture dependent jar dependencies. :(
33 # May be possible to unify these, but could lead to huge closure sizes.
34 mvnHash = selectSystem {
35 x86_64-linux = "sha256-vXZAlZOh9pXNF1RL78oQRal5pkXFRKDz/7SP9LibgiA=";
36 aarch64-linux = "sha256-xC+feb41EPi30gBrVR8usanVULI2Pt0knztzNagPQiw=";
38 mvnParameters = "-DskipTests";
48 mkdir -p $out/share/java
49 install -Dm644 target/ns-usbloader-${version}.jar $out/share/java/ns-usbloader.jar
52 makeWrapper ${jreWithJavaFX}/bin/java $out/bin/ns-usbloader \
53 --append-flags "-jar $out/share/java/ns-usbloader.jar"
55 mkdir -p $out/lib/udev/rules.d
56 install -Dm644 ${./99-ns-usbloader.rules} $out/lib/udev/rules.d/99-ns-usbloader.rules
58 mkdir -p $out/share/icons/hicolor
59 install -Dm644 target/classes/res/app_icon32x32.png $out/share/icons/hicolor/32x32/apps/ns-usbloader.png
60 install -Dm644 target/classes/res/app_icon48x48.png $out/share/icons/hicolor/48x48/apps/ns-usbloader.png
61 install -Dm644 target/classes/res/app_icon64x64.png $out/share/icons/hicolor/64x64/apps/ns-usbloader.png
62 install -Dm644 target/classes/res/app_icon128x128.png $out/share/icons/hicolor/128x128/apps/ns-usbloader.png
70 name = "ns-usbloader";
71 desktopName = "NS-USBLoader";
72 comment = pkgDescription;
73 exec = "ns-usbloader";
74 icon = "ns-usbloader";
75 categories = [ "Game" ];
77 keywords = [ "nintendo" "switch" ];
82 description = pkgDescription;
83 homepage = "https://github.com/developersu/ns-usbloader";
84 license = licenses.gpl3Only;
85 maintainers = with maintainers; [ soupglasses ];
86 platforms = [ "x86_64-linux" "aarch64-linux" ];