diff --git a/pkgs/applications/misc/ns-usbloader/default.nix b/pkgs/applications/misc/ns-usbloader/default.nix index b86ae37363ee..f50f14d5e2b8 100644 --- a/pkgs/applications/misc/ns-usbloader/default.nix +++ b/pkgs/applications/misc/ns-usbloader/default.nix @@ -4,6 +4,8 @@ , copyDesktopItems , makeDesktopItem , makeWrapper +, wrapGAppsHook +, gvfs , maven , jre }: @@ -40,18 +42,25 @@ maven.buildMavenPackage rec { nativeBuildInputs = [ copyDesktopItems makeWrapper + wrapGAppsHook + gvfs ]; + # Don't wrap binaries twice. + dontWrapGApps = true; + + ### Issues: + # * Set us to only use software rendering with `-Dprism.order=sw`, had a hard time + # getting `prism_es2` happy with NixOS's GL/GLES. + # * Currently, there's also a lot of `Failed to build parent project for org.openjfx:javafx-*` + # at build, but jar runs fine when using `jreWithJavaFX`. + installPhase = '' runHook preInstall mkdir -p $out/share/java install -Dm644 target/ns-usbloader-${version}.jar $out/share/java/ns-usbloader.jar - mkdir -p $out/bin - makeWrapper ${jreWithJavaFX}/bin/java $out/bin/ns-usbloader \ - --append-flags "-jar $out/share/java/ns-usbloader.jar" - mkdir -p $out/lib/udev/rules.d install -Dm644 ${./99-ns-usbloader.rules} $out/lib/udev/rules.d/99-ns-usbloader.rules @@ -64,6 +73,13 @@ maven.buildMavenPackage rec { runHook postInstall ''; + preFixup = '' + mkdir -p $out/bin + makeWrapper ${jreWithJavaFX}/bin/java $out/bin/ns-usbloader \ + --append-flags "-Dprism.order=sw -jar $out/share/java/ns-usbloader.jar" \ + "''${gappsWrapperArgs[@]}" + ''; + desktopItems = [ (makeDesktopItem { type = "Application";