forked from mirrors/nixpkgs
Merge pull request #113914 from raboof/sweethome3d-use-default-jre
sweethome3d: run using the default jre
This commit is contained in:
commit
23f1c43e17
|
@ -1,5 +1,20 @@
|
|||
{ lib, stdenv, fetchurl, fetchsvn, makeWrapper, makeDesktopItem, jdk, jre, ant
|
||||
, gtk3, gsettings-desktop-schemas, p7zip, libXxf86vm }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchsvn
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
# sweethome3d 6.4.2 does not yet build with jdk 9 and later.
|
||||
# this is fixed on trunk (7699?) but let's build with jdk8 until then.
|
||||
, jdk8
|
||||
# it can run on the latest stable jre fine though
|
||||
, jre
|
||||
, ant
|
||||
, gtk3
|
||||
, gsettings-desktop-schemas
|
||||
, p7zip
|
||||
, libXxf86vm
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
|
@ -27,23 +42,29 @@ let
|
|||
categories = "Graphics;2DGraphics;3DGraphics;";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/amd64/libnativewindow_awt.so
|
||||
patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/amd64/libnativewindow_x11.so
|
||||
patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/i586/libnativewindow_awt.so
|
||||
patchelf --set-rpath ${libXxf86vm}/lib lib/java3d-1.6/linux/i586/libnativewindow_x11.so
|
||||
'';
|
||||
|
||||
buildInputs = [ ant jdk makeWrapper p7zip gtk3 gsettings-desktop-schemas ];
|
||||
buildInputs = [ ant jdk8 makeWrapper p7zip gtk3 gsettings-desktop-schemas ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
ant furniture textures help
|
||||
mkdir -p $out/share/{java,applications}
|
||||
mv "build/"*.jar $out/share/java/.
|
||||
ant
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
cp install/${module}-${version}.jar $out/share/java/.
|
||||
|
||||
|
@ -59,6 +80,8 @@ let
|
|||
--set MESA_GL_VERSION_OVERRIDE 2.1 \
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:${gtk3.out}/share:${gsettings-desktop-schemas}/share:$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--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}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
|
|
@ -1,5 +1,17 @@
|
|||
{ lib, stdenv, fetchcvs, makeWrapper, makeDesktopItem, jdk, jre, ant
|
||||
, gtk3, gsettings-desktop-schemas, sweethome3dApp }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchcvs
|
||||
, makeWrapper
|
||||
, makeDesktopItem
|
||||
# sweethome3d 6.4.2 does not yet build with jdk 9 and later.
|
||||
# this is fixed on trunk (7699?) but let's build with jdk8 until then.
|
||||
, jdk8
|
||||
# it can run on the latest stable jre fine though
|
||||
, jre
|
||||
, ant
|
||||
, gtk3
|
||||
, gsettings-desktop-schemas
|
||||
, sweethome3dApp }:
|
||||
|
||||
let
|
||||
|
||||
|
@ -23,15 +35,19 @@ let
|
|||
categories = "Graphics;2DGraphics;3DGraphics;";
|
||||
};
|
||||
|
||||
buildInputs = [ ant jre jdk makeWrapper gtk3 gsettings-desktop-schemas ];
|
||||
buildInputs = [ ant jdk8 makeWrapper gtk3 gsettings-desktop-schemas ];
|
||||
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
sed -i -e 's,../SweetHome3D,${application.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 = ''
|
||||
ant -lib ${application.src}/libtest -lib ${application.src}/lib -lib ${jdk}/lib
|
||||
runHook preBuild
|
||||
|
||||
ant -lib ${application.src}/libtest -lib ${application.src}/lib -lib ${jdk8}/lib
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -24988,16 +24988,12 @@ in
|
|||
|
||||
linuxstopmotion = libsForQt5.callPackage ../applications/video/linuxstopmotion { };
|
||||
|
||||
sweethome3d = recurseIntoAttrs ( (callPackage ../applications/misc/sweethome3d {
|
||||
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||
})
|
||||
// (callPackage ../applications/misc/sweethome3d/editors.nix {
|
||||
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||
sweethome3dApp = sweethome3d.application;
|
||||
})
|
||||
);
|
||||
sweethome3d = recurseIntoAttrs (
|
||||
(callPackage ../applications/misc/sweethome3d { }) //
|
||||
(callPackage ../applications/misc/sweethome3d/editors.nix {
|
||||
sweethome3dApp = sweethome3d.application;
|
||||
})
|
||||
);
|
||||
|
||||
swingsane = callPackage ../applications/graphics/swingsane { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue