sweethome3d: 6.4.2 -> 6.5.2, also bump editors, use fetchurl and fix build

fixes build failures
https://hydra.nixos.org/build/142550788/nixlog/2
https://hydra.nixos.org/build/142549864/nixlog/2

Replaces fetchsvn/fetchcvs with fetchurl because fetchcvs wasn't able to fetch newer versions.

jre8 seems to be required due to InaccessibleObjectException/IllegalAccessException on app start on jdk9+

ZHF: #122042

authored by

Dmitry Ivankov and committed by
Jonathan Ringer
9236fe83 61e1c0fe

+36 -35
+9 -12
pkgs/applications/misc/sweethome3d/default.nix
··· 1 { lib 2 , stdenv 3 , fetchurl 4 - , fetchsvn 5 , makeWrapper 6 , makeDesktopItem 7 - # sweethome3d 6.4.2 does not yet build with jdk 9 and later. 8 - # this is fixed on trunk (7699?) but let's build with jdk8 until then. 9 , jdk8 10 - # it can run on the latest stable jre fine though 11 - , jre 12 , ant 13 , gtk3 14 , gsettings-desktop-schemas 15 , p7zip 16 , libXxf86vm 17 }: 18 19 let ··· 49 patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/i586/libnativewindow_x11.so 50 ''; 51 52 - nativeBuildInputs = [ makeWrapper ]; 53 buildInputs = [ ant jdk8 p7zip gtk3 gsettings-desktop-schemas ]; 54 55 buildPhase = '' ··· 77 # without it a "Profiles [GL4bc, GL3bc, GL2, GLES1] not available on device null" 78 # exception is thrown on startup. 79 # https://discourse.nixos.org/t/glx-not-recognised-after-mesa-update/6753 80 - makeWrapper ${jre}/bin/java $out/bin/$exec \ 81 --set MESA_GL_VERSION_OVERRIDE 2.1 \ 82 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ 83 --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}" ··· 102 103 application = mkSweetHome3D rec { 104 pname = lib.toLower module + "-application"; 105 - version = "6.4.2"; 106 module = "SweetHome3D"; 107 description = "Design and visualize your future home"; 108 license = lib.licenses.gpl2Plus; 109 - src = fetchsvn { 110 - url = "https://svn.code.sf.net/p/sweethome3d/code/tags/V_" + d2u version + "/SweetHome3D/"; 111 - sha256 = "13rczayakwb5246hqnp8lnw61p0p7ywr2294bnlp4zwsrz1in9z4"; 112 - rev = "7504"; 113 }; 114 desktopName = "Sweet Home 3D"; 115 icons = {
··· 1 { lib 2 , stdenv 3 , fetchurl 4 , makeWrapper 5 , makeDesktopItem 6 + # sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later? 7 , jdk8 8 + , jre8 9 , ant 10 , gtk3 11 , gsettings-desktop-schemas 12 , p7zip 13 , libXxf86vm 14 + , unzip 15 }: 16 17 let ··· 47 patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/i586/libnativewindow_x11.so 48 ''; 49 50 + nativeBuildInputs = [ makeWrapper unzip ]; 51 buildInputs = [ ant jdk8 p7zip gtk3 gsettings-desktop-schemas ]; 52 53 buildPhase = '' ··· 75 # without it a "Profiles [GL4bc, GL3bc, GL2, GLES1] not available on device null" 76 # exception is thrown on startup. 77 # https://discourse.nixos.org/t/glx-not-recognised-after-mesa-update/6753 78 + makeWrapper ${jre8}/bin/java $out/bin/$exec \ 79 --set MESA_GL_VERSION_OVERRIDE 2.1 \ 80 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ 81 --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}" ··· 100 101 application = mkSweetHome3D rec { 102 pname = lib.toLower module + "-application"; 103 + version = "6.5.2"; 104 module = "SweetHome3D"; 105 description = "Design and visualize your future home"; 106 license = lib.licenses.gpl2Plus; 107 + src = fetchurl { 108 + url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip"; 109 + sha256 = "1j0xm2vmcxxjmf12k8rfnisq9hd7hqaiyxrfbrbjxis9iq3kycp3"; 110 }; 111 desktopName = "Sweet Home 3D"; 112 icons = {
+27 -23
pkgs/applications/misc/sweethome3d/editors.nix
··· 1 { lib 2 , stdenv 3 - , fetchcvs 4 , makeWrapper 5 , makeDesktopItem 6 - # sweethome3d 6.4.2 does not yet build with jdk 9 and later. 7 - # this is fixed on trunk (7699?) but let's build with jdk8 until then. 8 , jdk8 9 - # it can run on the latest stable jre fine though 10 - , jre 11 , ant 12 , gtk3 13 , gsettings-desktop-schemas 14 - , sweethome3dApp }: 15 16 let 17 ··· 20 + removeSuffix "libraryeditor" (toLower m) 21 + "-editor"; 22 23 mkEditorProject = 24 { pname, module, version, src, license, description, desktopName }: 25 ··· 35 categories = "Graphics;2DGraphics;3DGraphics;"; 36 }; 37 38 - nativeBuildInputs = [ makeWrapper ]; 39 - buildInputs = [ ant jre jdk8 gtk3 gsettings-desktop-schemas ]; 40 41 postPatch = '' 42 - sed -i -e 's,../SweetHome3D,${application.src},g' build.xml 43 sed -i -e 's,lib/macosx/java3d-1.6/jogl-all.jar,lib/java3d-1.6/jogl-all.jar,g' build.xml 44 ''; 45 46 buildPhase = '' 47 runHook preBuild 48 49 - ant -lib ${application.src}/libtest -lib ${application.src}/lib -lib ${jdk8}/lib 50 51 runHook postBuild 52 ''; ··· 56 mkdir -p $out/share/{java,applications} 57 cp ${module}-${version}.jar $out/share/java/. 58 cp "${editorItem}/share/applications/"* $out/share/applications 59 - makeWrapper ${jre}/bin/java $out/bin/$exec \ 60 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ 61 --add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" 62 ''; ··· 78 in { 79 80 textures-editor = mkEditorProject rec { 81 - version = "1.5"; 82 module = "TexturesLibraryEditor"; 83 pname = module; 84 description = "Easily create SH3T files and edit the properties of the texture images it contain"; 85 license = lib.licenses.gpl2Plus; 86 - src = fetchcvs { 87 - cvsRoot = ":pserver:anonymous@sweethome3d.cvs.sourceforge.net:/cvsroot/sweethome3d"; 88 - sha256 = "15wxdns3hc8yq362x0rj53bcxran2iynxznfcb9js85psd94zq7h"; 89 - module = module; 90 - tag = "V_" + d2u version; 91 }; 92 desktopName = "Sweet Home 3D - Textures Library Editor"; 93 }; 94 95 furniture-editor = mkEditorProject rec { 96 - version = "1.19"; 97 module = "FurnitureLibraryEditor"; 98 pname = module; 99 description = "Quickly create SH3F files and edit the properties of the 3D models it contain"; 100 license = lib.licenses.gpl2; 101 - src = fetchcvs { 102 - cvsRoot = ":pserver:anonymous@sweethome3d.cvs.sourceforge.net:/cvsroot/sweethome3d"; 103 - sha256 = "0rr4nqil1mngak3ds5vz7f1whrgcgzpk6fb0qcr5ljms0jx0ylvs"; 104 - module = module; 105 - tag = "V_" + d2u version; 106 }; 107 desktopName = "Sweet Home 3D - Furniture Library Editor"; 108 };
··· 1 { lib 2 , stdenv 3 + , fetchurl 4 , makeWrapper 5 , makeDesktopItem 6 + # sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later? 7 , jdk8 8 + , jre8 9 , ant 10 , gtk3 11 , gsettings-desktop-schemas 12 + , sweethome3dApp 13 + , unzip 14 + }: 15 16 let 17 ··· 20 + removeSuffix "libraryeditor" (toLower m) 21 + "-editor"; 22 23 + applicationSrc = stdenv.mkDerivation { 24 + name = "application-src"; 25 + src = sweethome3dApp.src; 26 + nativeBuildInputs = [ unzip ]; 27 + buildPhase = ""; 28 + installPhase = "cp -r . $out"; 29 + }; 30 + 31 mkEditorProject = 32 { pname, module, version, src, license, description, desktopName }: 33 ··· 43 categories = "Graphics;2DGraphics;3DGraphics;"; 44 }; 45 46 + nativeBuildInputs = [ makeWrapper unzip ]; 47 + buildInputs = [ ant jre8 jdk8 gtk3 gsettings-desktop-schemas ]; 48 49 postPatch = '' 50 + sed -i -e 's,../SweetHome3D,${applicationSrc},g' build.xml 51 sed -i -e 's,lib/macosx/java3d-1.6/jogl-all.jar,lib/java3d-1.6/jogl-all.jar,g' build.xml 52 ''; 53 54 buildPhase = '' 55 runHook preBuild 56 57 + ant -lib ${applicationSrc}/libtest -lib ${applicationSrc}/lib -lib ${jdk8}/lib 58 59 runHook postBuild 60 ''; ··· 64 mkdir -p $out/share/{java,applications} 65 cp ${module}-${version}.jar $out/share/java/. 66 cp "${editorItem}/share/applications/"* $out/share/applications 67 + makeWrapper ${jre8}/bin/java $out/bin/$exec \ 68 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \ 69 --add-flags "-jar $out/share/java/${module}-${version}.jar -d${toString stdenv.hostPlatform.parsed.cpu.bits}" 70 ''; ··· 86 in { 87 88 textures-editor = mkEditorProject rec { 89 + version = "1.7"; 90 module = "TexturesLibraryEditor"; 91 pname = module; 92 description = "Easily create SH3T files and edit the properties of the texture images it contain"; 93 license = lib.licenses.gpl2Plus; 94 + src = fetchurl { 95 + url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip"; 96 + sha256 = "03vb9y645qzffxxdhgbjb0d98k3lafxckg2vh2s86j62b6357d0h"; 97 }; 98 desktopName = "Sweet Home 3D - Textures Library Editor"; 99 }; 100 101 furniture-editor = mkEditorProject rec { 102 + version = "1.27"; 103 module = "FurnitureLibraryEditor"; 104 pname = module; 105 description = "Quickly create SH3F files and edit the properties of the 3D models it contain"; 106 license = lib.licenses.gpl2; 107 + src = fetchurl { 108 + url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip"; 109 + sha256 = "1zxbcn9awgax8lalzkc05f5yfwbgnrayc17fkyv5i19j4qb3r2a0"; 110 }; 111 desktopName = "Sweet Home 3D - Furniture Library Editor"; 112 };