Merge pull request #245931 from soupglasses/pkg/ns-usbloader-7.0

ns-usbloader: init at 7.0

authored by

Weijia Wang and committed by
GitHub
2d698428 a4c462eb

+324 -8
+6 -6
maintainers/maintainer-list.nix
··· 7178 fingerprint = "F5B2 BE1B 9AAD 98FE 2916 5597 3665 FFF7 9D38 7BAA"; 7179 }]; 7180 }; 7181 - imsofi = { 7182 - email = "sofi+git@mailbox.org"; 7183 - github = "imsofi"; 7184 - githubId = 20756843; 7185 - name = "Sofi"; 7186 - }; 7187 imuli = { 7188 email = "i@imu.li"; 7189 github = "imuli"; ··· 15675 github = "sorpaas"; 15676 githubId = 6277322; 15677 name = "Wei Tang"; 15678 }; 15679 soywod = { 15680 name = "Clément DOUIN";
··· 7178 fingerprint = "F5B2 BE1B 9AAD 98FE 2916 5597 3665 FFF7 9D38 7BAA"; 7179 }]; 7180 }; 7181 imuli = { 7182 email = "i@imu.li"; 7183 github = "imuli"; ··· 15669 github = "sorpaas"; 15670 githubId = 6277322; 15671 name = "Wei Tang"; 15672 + }; 15673 + soupglasses = { 15674 + email = "sofi+git@mailbox.org"; 15675 + github = "soupglasses"; 15676 + githubId = 20756843; 15677 + name = "Sofi"; 15678 }; 15679 soywod = { 15680 name = "Clément DOUIN";
+2
nixos/doc/manual/release-notes/rl-2311.section.md
··· 22 23 - [Typesense](https://github.com/typesense/typesense), a fast, typo-tolerant search engine for building delightful search experiences. Available as [services.typesense](#opt-services.typesense.enable). 24 25 - [Anuko Time Tracker](https://github.com/anuko/timetracker), a simple, easy to use, open source time tracking system. Available as [services.anuko-time-tracker](#opt-services.anuko-time-tracker.enable). 26 27 - [sitespeed-io](https://sitespeed.io), a tool that can generate metrics (timings, diagnostics) for websites. Available as [services.sitespeed-io](#opt-services.sitespeed-io.enable).
··· 22 23 - [Typesense](https://github.com/typesense/typesense), a fast, typo-tolerant search engine for building delightful search experiences. Available as [services.typesense](#opt-services.typesense.enable). 24 25 + * [NS-USBLoader](https://github.com/developersu/ns-usbloader/), an all-in-one tool for managing Nintendo Switch homebrew. Available as [programs.ns-usbloader](#opt-programs.ns-usbloader.enable). 26 + 27 - [Anuko Time Tracker](https://github.com/anuko/timetracker), a simple, easy to use, open source time tracking system. Available as [services.anuko-time-tracker](#opt-services.anuko-time-tracker.enable). 28 29 - [sitespeed-io](https://sitespeed.io), a tool that can generate metrics (timings, diagnostics) for websites. Available as [services.sitespeed-io](#opt-services.sitespeed-io.enable).
+1
nixos/modules/module-list.nix
··· 221 ./programs/nncp.nix 222 ./programs/noisetorch.nix 223 ./programs/npm.nix 224 ./programs/oblogout.nix 225 ./programs/oddjobd.nix 226 ./programs/openvpn3.nix
··· 221 ./programs/nncp.nix 222 ./programs/noisetorch.nix 223 ./programs/npm.nix 224 + ./programs/ns-usbloader.nix 225 ./programs/oblogout.nix 226 ./programs/oddjobd.nix 227 ./programs/openvpn3.nix
+18
nixos/modules/programs/ns-usbloader.nix
···
··· 1 + { config, lib, pkgs, ... }: 2 + let 3 + cfg = config.programs.ns-usbloader; 4 + in 5 + { 6 + options = { 7 + programs.ns-usbloader = { 8 + enable = lib.mkEnableOption (lib.mdDoc "ns-usbloader application with udev rules applied"); 9 + }; 10 + }; 11 + 12 + config = lib.mkIf cfg.enable { 13 + environment.systemPackages = [ pkgs.ns-usbloader ]; 14 + services.udev.packages = [ pkgs.ns-usbloader ]; 15 + }; 16 + 17 + meta.maintainers = pkgs.ns-usbloader.meta.maintainers; 18 + }
+4
pkgs/applications/misc/ns-usbloader/99-ns-usbloader.rules
···
··· 1 + # Nintendo Switch HOS 2 + SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", MODE="0666" 3 + # Nintendo Switch RCM 4 + SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7321", MODE="0666"
+89
pkgs/applications/misc/ns-usbloader/default.nix
···
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , copyDesktopItems 5 + , makeDesktopItem 6 + , makeWrapper 7 + , maven 8 + , jre 9 + }: 10 + let 11 + pkgDescription = "All-in-one tool for managing Nintendo Switch homebrew"; 12 + 13 + selectSystem = attrs: 14 + attrs.${stdenv.hostPlatform.system} 15 + or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 16 + 17 + jreWithJavaFX = jre.override { enableJavaFX = true; }; 18 + in 19 + maven.buildMavenPackage rec { 20 + pname = "ns-usbloader"; 21 + version = "7.0"; 22 + 23 + src = fetchFromGitHub { 24 + owner = "developersu"; 25 + repo = "ns-usbloader"; 26 + rev = "v${version}"; 27 + sha256 = "sha256-x4zGwsDUVUHI4AUMPSqgnZVyZx+pWQA5xvtrFE8U3QU="; 28 + }; 29 + 30 + patches = [ ./no-launch4j.patch ./make-deterministic.patch ]; 31 + 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="; 37 + }; 38 + mvnParameters = "-DskipTests"; 39 + 40 + nativeBuildInputs = [ 41 + copyDesktopItems 42 + maven 43 + makeWrapper 44 + ]; 45 + 46 + installPhase = '' 47 + runHook preInstall 48 + 49 + mkdir -p $out/share/java 50 + install -Dm644 target/ns-usbloader-${version}.jar $out/share/java/ns-usbloader.jar 51 + 52 + mkdir -p $out/bin 53 + makeWrapper ${jreWithJavaFX}/bin/java $out/bin/ns-usbloader \ 54 + --append-flags "-jar $out/share/java/ns-usbloader.jar" 55 + 56 + mkdir -p $out/lib/udev/rules.d 57 + install -Dm644 ${./99-ns-usbloader.rules} $out/lib/udev/rules.d/99-ns-usbloader.rules 58 + 59 + mkdir -p $out/share/icons/hicolor 60 + install -Dm644 target/classes/res/app_icon32x32.png $out/share/icons/hicolor/32x32/apps/ns-usbloader.png 61 + install -Dm644 target/classes/res/app_icon48x48.png $out/share/icons/hicolor/48x48/apps/ns-usbloader.png 62 + install -Dm644 target/classes/res/app_icon64x64.png $out/share/icons/hicolor/64x64/apps/ns-usbloader.png 63 + install -Dm644 target/classes/res/app_icon128x128.png $out/share/icons/hicolor/128x128/apps/ns-usbloader.png 64 + 65 + runHook postInstall 66 + ''; 67 + 68 + desktopItems = [ 69 + (makeDesktopItem { 70 + type = "Application"; 71 + name = "ns-usbloader"; 72 + desktopName = "NS-USBLoader"; 73 + comment = pkgDescription; 74 + exec = "ns-usbloader"; 75 + icon = "ns-usbloader"; 76 + categories = [ "Game" ]; 77 + terminal = false; 78 + keywords = [ "nintendo" "switch" ]; 79 + }) 80 + ]; 81 + 82 + meta = with lib; { 83 + description = pkgDescription; 84 + homepage = "https://github.com/developersu/ns-usbloader"; 85 + license = licenses.gpl3Only; 86 + maintainers = with maintainers; [ soupglasses ]; 87 + platforms = [ "x86_64-linux" "aarch64-linux" ]; 88 + }; 89 + }
+130
pkgs/applications/misc/ns-usbloader/make-deterministic.patch
···
··· 1 + From 3f85e2754144bbf2805ba68d8c76b3dec3299f4d Mon Sep 17 00:00:00 2001 2 + From: Sofi <sofi+git@mailbox.org> 3 + Date: Sat, 29 Jul 2023 11:16:38 +0200 4 + Subject: [PATCH] make deterministic 5 + 6 + --- 7 + pom.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 8 + 1 file changed, 57 insertions(+), 6 deletions(-) 9 + 10 + diff --git a/pom.xml b/pom.xml 11 + index 320d4f3..5a594e6 100644 12 + --- a/pom.xml 13 + +++ b/pom.xml 14 + @@ -51,6 +51,7 @@ 15 + <maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format> 16 + <javafx.version>19.0.2.1</javafx.version> 17 + <maven.compiler.release>11</maven.compiler.release> 18 + + <project.build.outputTimestamp>2023-01-01T00:00:00Z</project.build.outputTimestamp> 19 + </properties> 20 + 21 + <issueManagement> 22 + @@ -166,7 +167,7 @@ 23 + </dependency> 24 + </dependencies> 25 + <build> 26 + - <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName> 27 + + <finalName>${project.artifactId}-${project.version}</finalName> 28 + <resources> 29 + <resource> 30 + <directory>src/main/resources</directory> 31 + @@ -193,26 +194,51 @@ 32 + <plugin> 33 + <groupId>org.apache.maven.plugins</groupId> 34 + <artifactId>maven-surefire-plugin</artifactId> 35 + - <version>2.22.2</version> 36 + + <version>3.1.2</version> 37 + </plugin> 38 + <plugin> 39 + <groupId>org.apache.maven.plugins</groupId> 40 + <artifactId>maven-failsafe-plugin</artifactId> 41 + - <version>2.22.2</version> 42 + + <version>3.1.2</version> 43 + </plugin> 44 + <plugin> 45 + <groupId>org.apache.maven.plugins</groupId> 46 + <artifactId>maven-compiler-plugin</artifactId> 47 + - <version>3.10.1</version> 48 + + <version>3.11.0</version> 49 + <configuration> 50 + <release>11</release> 51 + </configuration> 52 + </plugin> 53 + + <plugin> 54 + + <groupId>org.apache.maven.plugins</groupId> 55 + + <artifactId>maven-enforcer-plugin</artifactId> 56 + + <version>3.3.0</version> 57 + + <executions> 58 + + <execution> 59 + + <id>enforce-versions</id> 60 + + <phase>validate</phase> 61 + + <goals> 62 + + <goal>enforce</goal> 63 + + </goals> 64 + + <configuration> 65 + + <rules> 66 + + <requireMavenVersion> 67 + + <version>[3.2.5,)</version> 68 + + </requireMavenVersion> 69 + + <requireJavaVersion> 70 + + <version>[1.8,)</version> 71 + + </requireJavaVersion> 72 + + <requirePluginVersions /> 73 + + </rules> 74 + + </configuration> 75 + + </execution> 76 + + </executions> 77 + + </plugin> 78 + <!-- Don't generate default JAR without dependencies --> 79 + <plugin> 80 + <groupId>org.apache.maven.plugins</groupId> 81 + <artifactId>maven-jar-plugin</artifactId> 82 + - <version>3.1.2</version> 83 + + <version>3.3.0</version> 84 + <!-- 85 + <configuration> 86 + <manifestEntries> 87 + @@ -231,7 +257,7 @@ 88 + <plugin> 89 + <groupId>org.apache.maven.plugins</groupId> 90 + <artifactId>maven-assembly-plugin</artifactId> 91 + - <version>3.1.0</version> 92 + + <version>3.6.0</version> 93 + <configuration> 94 + <archive> 95 + <manifest> 96 + @@ -253,6 +279,31 @@ 97 + </execution> 98 + </executions> 99 + </plugin> 100 + + <plugin> 101 + + <groupId>org.apache.maven.plugins</groupId> 102 + + <artifactId>maven-deploy-plugin</artifactId> 103 + + <version>3.1.1</version> 104 + + </plugin> 105 + + <plugin> 106 + + <groupId>org.apache.maven.plugins</groupId> 107 + + <artifactId>maven-resources-plugin</artifactId> 108 + + <version>3.3.1</version> 109 + + </plugin> 110 + + <plugin> 111 + + <groupId>org.apache.maven.plugins</groupId> 112 + + <artifactId>maven-site-plugin</artifactId> 113 + + <version>4.0.0-M9</version> 114 + + </plugin> 115 + + <plugin> 116 + + <groupId>org.apache.maven.plugins</groupId> 117 + + <artifactId>maven-install-plugin</artifactId> 118 + + <version>3.1.1</version> 119 + + </plugin> 120 + + <plugin> 121 + + <groupId>org.apache.maven.plugins</groupId> 122 + + <artifactId>maven-clean-plugin</artifactId> 123 + + <version>3.3.1</version> 124 + + </plugin> 125 + </plugins> 126 + </build> 127 + </project> 128 + -- 129 + 2.41.0 130 +
+70
pkgs/applications/misc/ns-usbloader/no-launch4j.patch
···
··· 1 + From ead7a3b988a47a3896ea8a3ff01556e073115f16 Mon Sep 17 00:00:00 2001 2 + From: Sofi <sofi+git@mailbox.org> 3 + Date: Thu, 27 Jul 2023 17:23:31 +0200 4 + Subject: [PATCH] No launch4j 5 + 6 + --- 7 + pom.xml | 47 +---------------------------------------------- 8 + 1 file changed, 1 insertion(+), 46 deletions(-) 9 + 10 + diff --git a/pom.xml b/pom.xml 11 + index 21352e0..320d4f3 100644 12 + --- a/pom.xml 13 + +++ b/pom.xml 14 + @@ -253,51 +253,6 @@ 15 + </execution> 16 + </executions> 17 + </plugin> 18 + - <plugin> 19 + - <groupId>com.akathist.maven.plugins.launch4j</groupId> 20 + - <version>2.2.0</version> 21 + - <artifactId>launch4j-maven-plugin</artifactId> 22 + - <executions> 23 + - <execution> 24 + - <id>l4j-ns-usbloader</id> 25 + - <phase>package</phase> 26 + - <goals> 27 + - <goal>launch4j</goal> 28 + - </goals> 29 + - <configuration> 30 + - <headerType>gui</headerType> 31 + - <icon>appicon.ico</icon> 32 + - <outfile>target/${project.name}.exe</outfile> 33 + - <jar>target/${project.artifactId}-${project.version}-${maven.build.timestamp}.jar</jar> 34 + - <!-- <downloadUrl>https://download.oracle.com/java/17/archive/jdk-17.0.1_windows-x64_bin.msi</downloadUrl> --> 35 + - <errTitle>Launching error</errTitle> 36 + - <!-- <dontWrapJar>true</dontWrapJar> --> 37 + - <jre> 38 + - <path>%PWD%/jdk</path> 39 + - <minVersion>11.0.0</minVersion> 40 + - </jre> 41 + - <versionInfo> 42 + - <fileVersion>${project.version}.0.0</fileVersion> 43 + - <txtFileVersion>${project.version}</txtFileVersion> 44 + - <fileDescription>NS multi-tool</fileDescription> 45 + - <copyright>GNU General Public License v3, ${project.inceptionYear} ${project.organization.name}, Russia.</copyright> 46 + - <productVersion>${project.version}.0.0</productVersion> 47 + - <txtProductVersion>${project.version}</txtProductVersion> 48 + - <companyName>${project.organization.name}</companyName> 49 + - <productName>${project.name}</productName> 50 + - <internalName>${project.name}</internalName> 51 + - <originalFilename>${project.name}.exe</originalFilename> 52 + - </versionInfo> 53 + - <messages> 54 + - <startupErr>Startup error</startupErr> 55 + - <jreNotFoundErr>JDK not found</jreNotFoundErr> 56 + - <jreVersionErr>JDK Version mismatch</jreVersionErr> 57 + - <launcherErr>Launcher Error</launcherErr> 58 + - </messages> 59 + - </configuration> 60 + - </execution> 61 + - </executions> 62 + - </plugin> 63 + </plugins> 64 + </build> 65 + -</project> 66 + \ No newline at end of file 67 + +</project> 68 + -- 69 + 2.41.0 70 +
+1 -1
pkgs/applications/science/math/geogebra/default.nix
··· 27 calculus in one easy-to-use package. 28 ''; 29 homepage = "https://www.geogebra.org/"; 30 - maintainers = with maintainers; [ sikmir imsofi ]; 31 license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ]; 32 sourceProvenance = with sourceTypes; [ 33 binaryBytecode
··· 27 calculus in one easy-to-use package. 28 ''; 29 homepage = "https://www.geogebra.org/"; 30 + maintainers = with maintainers; [ sikmir soupglasses ]; 31 license = with licenses; [ gpl3 cc-by-nc-sa-30 geogebra ]; 32 sourceProvenance = with sourceTypes; [ 33 binaryBytecode
+1 -1
pkgs/games/ferium/default.nix
··· 34 description = "Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases"; 35 homepage = "https://github.com/gorilla-devs/ferium"; 36 license = licenses.mpl20; 37 - maintainers = with maintainers; [ leo60228 imsofi ]; 38 }; 39 }
··· 34 description = "Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases"; 35 homepage = "https://github.com/gorilla-devs/ferium"; 36 license = licenses.mpl20; 37 + maintainers = with maintainers; [ leo60228 soupglasses ]; 38 }; 39 }
+2
pkgs/top-level/all-packages.nix
··· 33644 33645 novnc = callPackage ../applications/networking/novnc { }; 33646 33647 nwg-bar = callPackage ../applications/misc/nwg-bar { }; 33648 33649 nwg-dock = callPackage ../applications/misc/nwg-dock { };
··· 33644 33645 novnc = callPackage ../applications/networking/novnc { }; 33646 33647 + ns-usbloader = callPackage ../applications/misc/ns-usbloader { }; 33648 + 33649 nwg-bar = callPackage ../applications/misc/nwg-bar { }; 33650 33651 nwg-dock = callPackage ../applications/misc/nwg-dock { };