Merge pull request #272882 from soupglasses/ns-usbloader/fix-file-picker

ns-usbloader: fix dependencies for gtk file picker
This commit is contained in:
Peder Bergebakken Sundt 2023-12-18 20:02:20 +01:00 committed by GitHub
commit 6d5be2aa09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";