about summary refs log tree commit diff
path: root/pkgs/applications/misc/sweethome3d/editors.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/sweethome3d/editors.nix')
-rw-r--r--pkgs/applications/misc/sweethome3d/editors.nix26
1 files changed, 9 insertions, 17 deletions
diff --git a/pkgs/applications/misc/sweethome3d/editors.nix b/pkgs/applications/misc/sweethome3d/editors.nix
index 926d75fe5c7a..f4fe14fb6751 100644
--- a/pkgs/applications/misc/sweethome3d/editors.nix
+++ b/pkgs/applications/misc/sweethome3d/editors.nix
@@ -1,6 +1,6 @@
 { lib
 , stdenv
-, fetchurl
+, fetchzip
 , makeWrapper
 , makeDesktopItem
 , jdk
@@ -18,14 +18,6 @@ let
     + removeSuffix "libraryeditor" (toLower m)
     + "-editor";
 
-  applicationSrc = stdenv.mkDerivation {
-    name = "application-src";
-    src = sweethome3dApp.src;
-    nativeBuildInputs = [ unzip ];
-    buildPhase = "";
-    installPhase = "cp -r . $out";
-  };
-
   mkEditorProject =
   { pname, module, version, src, license, description, desktopName }:
 
@@ -41,21 +33,21 @@ let
       categories = [ "Graphics" "2DGraphics" "3DGraphics" ];
     };
 
-    nativeBuildInputs = [ makeWrapper unzip ];
+    nativeBuildInputs = [ makeWrapper ];
     buildInputs = [ ant jdk gtk3 gsettings-desktop-schemas ];
 
     # upstream targets Java 7 by default
     env.ANT_ARGS = "-DappletClassSource=8 -DappletClassTarget=8 -DclassSource=8 -DclassTarget=8";
 
     postPatch = ''
-      sed -i -e 's,../SweetHome3D,${applicationSrc},g' build.xml
+      sed -i -e 's,../SweetHome3D,${sweethome3dApp.src},g' build.xml
       sed -i -e 's,lib/macosx/java3d-1.6/jogl-all.jar,lib/java3d-1.6/jogl-all.jar,g' build.xml
     '';
 
     buildPhase = ''
       runHook preBuild
 
-      ant -lib ${applicationSrc}/libtest -lib ${applicationSrc}/lib -lib ${jdk}/lib
+      ant -lib ${sweethome3dApp.src}/libtest -lib ${sweethome3dApp.src}/lib -lib ${jdk}/lib
 
       runHook postBuild
     '';
@@ -93,9 +85,9 @@ in {
     pname = module;
     description = "Easily create SH3T files and edit the properties of the texture images it contain";
     license = lib.licenses.gpl2Plus;
-    src = fetchurl {
+    src = fetchzip {
       url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
-      sha256 = "03vb9y645qzffxxdhgbjb0d98k3lafxckg2vh2s86j62b6357d0h";
+      hash = "sha256-v8hMEUujTgWvFnBTF8Dnd1iWgoIXBzGMUxBgmjdxx+g=";
     };
     desktopName = "Sweet Home 3D - Textures Library Editor";
   };
@@ -105,10 +97,10 @@ in {
     module = "FurnitureLibraryEditor";
     pname = module;
     description = "Quickly create SH3F files and edit the properties of the 3D models it contain";
-    license = lib.licenses.gpl2;
-    src = fetchurl {
+    license = lib.licenses.gpl2Plus;
+    src = fetchzip {
       url = "mirror://sourceforge/sweethome3d/${module}-${version}-src.zip";
-      sha256 = "sha256-r5xJlUctUdcknJfm8rbz+bdzFhqgHsHpHwxEC4mItws=";
+      hash = "sha256-pqsSxQPzsyx4PS98fgU6UFhPWhpQoepGm0uJtkvV46c=";
     };
     desktopName = "Sweet Home 3D - Furniture Library Editor";
   };