6 # sweethome3d 6.5.2 does not yet fully build&run with jdk 9 and later?
11 , gsettings-desktop-schemas
20 + removeSuffix "libraryeditor" (toLower m)
23 applicationSrc = stdenv.mkDerivation {
24 name = "application-src";
25 src = sweethome3dApp.src;
26 nativeBuildInputs = [ unzip ];
28 installPhase = "cp -r . $out";
32 { pname, module, version, src, license, description, desktopName }:
34 stdenv.mkDerivation rec {
35 application = sweethome3dApp;
36 inherit pname module version src description;
37 exec = sweetExec module;
38 editorItem = makeDesktopItem {
39 inherit exec desktopName;
41 comment = description;
42 genericName = "Computer Aided (Interior) Design";
43 categories = [ "Graphics" "2DGraphics" "3DGraphics" ];
46 nativeBuildInputs = [ makeWrapper unzip ];
47 buildInputs = [ ant jre8 jdk8 gtk3 gsettings-desktop-schemas ];
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
57 ant -lib ${applicationSrc}/libtest -lib ${applicationSrc}/lib -lib ${jdk8}/lib
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}"
75 homepage = "http://www.sweethome3d.com/index.jsp";
78 maintainers = [ lib.maintainers.edwtjo ];
79 platforms = lib.platforms.linux;
84 d2u = lib.replaceStrings ["."] ["_"];
88 textures-editor = mkEditorProject rec {
90 module = "TexturesLibraryEditor";
92 description = "Easily create SH3T files and edit the properties of the texture images it contain";
93 license = lib.licenses.gpl2Plus;
95 url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
96 sha256 = "03vb9y645qzffxxdhgbjb0d98k3lafxckg2vh2s86j62b6357d0h";
98 desktopName = "Sweet Home 3D - Textures Library Editor";
101 furniture-editor = mkEditorProject rec {
103 module = "FurnitureLibraryEditor";
105 description = "Quickly create SH3F files and edit the properties of the 3D models it contain";
106 license = lib.licenses.gpl2;
108 url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
109 sha256 = "sha256-r5xJlUctUdcknJfm8rbz+bdzFhqgHsHpHwxEC4mItws=";
111 desktopName = "Sweet Home 3D - Furniture Library Editor";