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