14 jdk' = jdk.override { enableJavaFX = true; };
16 maven.buildMavenPackage rec {
17 pname = "quark-goldleaf";
20 src = fetchFromGitHub {
24 hash = "sha256-gagIQGOiygJ0Onm0SrkbFWaovqWX2WJNx7LpSRheCLM=";
27 sourceRoot = "${src.name}/Quark";
30 ./fix-maven-plugin-versions.patch
31 ./remove-pom-jfx.patch
33 name = "fix-config-path.patch";
34 url = "https://github.com/XorTroll/Goldleaf/commit/714ecc2755df9c1252615ad02cafff9c0311a739.patch";
35 hash = "sha256-4j+6uLIOdltZ4XIb3OtOzZg9ReH9660gZMMNQpHnn4o=";
41 mvnHash = "sha256-gA3HsQZFa2POP9cyJLb1l8t3hrJYzDowhJU+5Xl79p4=";
43 # set fixed build timestamp for deterministic jar
44 mvnParameters = "-Dproject.build.outputTimestamp=1980-01-01T00:00:02Z";
47 imagemagick # for icon conversion
52 buildInputs = [ gtk3 ];
60 install -Dm644 ${./99-quark-goldleaf.rules} $out/etc/udev/rules.d/99-quark-goldleaf.rules
61 install -Dm644 target/Quark.jar $out/share/java/quark-goldleaf.jar
63 for size in 16 24 32 48 64 128; do
64 mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
65 convert -resize "$size"x"$size" src/main/resources/Icon.png $out/share/icons/hicolor/"$size"x"$size"/apps/quark-goldleaf.png
72 # This is in postFixup because gappsWrapperArgs are generated during preFixup
73 makeWrapper ${jdk'}/bin/java $out/bin/quark-goldleaf \
74 "''${gappsWrapperArgs[@]}" \
75 --add-flags "-jar $out/share/java/quark-goldleaf.jar"
80 name = "quark-goldleaf";
81 exec = "quark-goldleaf";
82 icon = "quark-goldleaf";
83 desktopName = "Quark";
84 comment = meta.description;
86 categories = [ "Utility" "FileTransfer" ];
87 keywords = [ "nintendo" "switch" "goldleaf" ];
92 changelog = "https://github.com/XorTroll/Goldleaf/releases/tag/${src.rev}";
93 description = "A GUI tool for transfering files between a computer and a Nintendo Switch running Goldleaf";
94 homepage = "https://github.com/XorTroll/Goldleaf#quark-and-remote-browsing";
98 For the program to work properly, you will have to install Nintendo Switch udev rules.
100 You can either do this by enabling the NixOS module:
102 `programs.quark-goldleaf.enable = true;`
104 or by adding the package manually to udev packages:
106 `services.udev.packages = [ pkgs.quark-goldleaf ];
108 license = lib.licenses.gpl3Only;
109 mainProgram = "quark-goldleaf";
110 maintainers = with lib.maintainers; [ tomasajt ];
111 platforms = with lib.platforms; linux ++ darwin;