Commit ba45aa9f authored by Gary Guo's avatar Gary Guo
Browse files

sweethome3d: upgrade JDK/JRE

The comment about 6.5 is no longer relevant.
I have tested building and running with latest JDK/JRE and it works well,
with more updated look & feel.
parent a35ae3a2
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -3,9 +3,7 @@
, fetchurl
, makeWrapper
, makeDesktopItem
# sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later?
, jdk8
, jre8
, jdk
, ant
, gtk3
, gsettings-desktop-schemas
@@ -43,7 +41,7 @@ let
    };

    postPatch = ''
      addAutoPatchelfSearchPath ${jre8}/lib/openjdk/jre/lib/
      addAutoPatchelfSearchPath ${jdk}/lib/openjdk/lib/
      autoPatchelf lib

      # Nix cannot see the runtime references to the paths we just patched in
@@ -53,7 +51,7 @@ let
    '';

    nativeBuildInputs = [ makeWrapper unzip autoPatchelfHook ];
    buildInputs = [ ant jdk8 p7zip gtk3 gsettings-desktop-schemas libXxf86vm ];
    buildInputs = [ ant jdk p7zip gtk3 gsettings-desktop-schemas libXxf86vm ];

    buildPhase = ''
      runHook preBuild
@@ -76,7 +74,7 @@ let

      cp "${sweethome3dItem}/share/applications/"* $out/share/applications

      makeWrapper ${jre8}/bin/java $out/bin/$exec \
      makeWrapper ${jdk}/bin/java $out/bin/$exec \
        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
        --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
        --add-flags "-Dsun.java2d.opengl=true -jar $out/share/java/${module}-${version}.jar -cp $out/share/java/Furniture.jar:$out/share/java/Textures.jar:$out/share/java/Help.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
+4 −6
Original line number Diff line number Diff line
@@ -3,9 +3,7 @@
, fetchurl
, makeWrapper
, makeDesktopItem
# sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later?
, jdk8
, jre8
, jdk
, ant
, gtk3
, gsettings-desktop-schemas
@@ -44,7 +42,7 @@ let
    };

    nativeBuildInputs = [ makeWrapper unzip ];
    buildInputs = [ ant jre8 jdk8 gtk3 gsettings-desktop-schemas ];
    buildInputs = [ ant jdk gtk3 gsettings-desktop-schemas ];

    postPatch = ''
      sed -i -e 's,../SweetHome3D,${applicationSrc},g' build.xml
@@ -54,7 +52,7 @@ let
    buildPhase = ''
      runHook preBuild

      ant -lib ${applicationSrc}/libtest -lib ${applicationSrc}/lib -lib ${jdk8}/lib
      ant -lib ${applicationSrc}/libtest -lib ${applicationSrc}/lib -lib ${jdk}/lib

      runHook postBuild
    '';
@@ -64,7 +62,7 @@ let
      mkdir -p $out/share/{java,applications}
      cp ${module}-${version}.jar $out/share/java/.
      cp "${editorItem}/share/applications/"* $out/share/applications
      makeWrapper ${jre8}/bin/java $out/bin/$exec \
      makeWrapper ${jdk}/bin/java $out/bin/$exec \
        --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
        --add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}"
    '';