greenfoot: 3.7.1 -> 3.8.0
https://greenfoot.org/version_history Also did some cleanup of the derivation to make it more like bluej (a very closely related program).
This commit is contained in:
parent
77cbaa4918
commit
11e7a4161f
2 changed files with 28 additions and 14 deletions
|
@ -1,31 +1,41 @@
|
||||||
{ lib, stdenv, fetchurl, makeWrapper, jdk }:
|
{ lib, stdenv, fetchurl, openjdk, glib, dpkg, wrapGAppsHook }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "greenfoot";
|
pname = "greenfoot";
|
||||||
version = "3.7.1";
|
version = "3.8.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
# We use the deb here. First instinct might be to go for the "generic" JAR
|
# We use the deb here. First instinct might be to go for the "generic" JAR
|
||||||
# download, but that is actually a graphical installer that is much harder
|
# download, but that is actually a graphical installer that is much harder
|
||||||
# to unpack than the deb.
|
# to unpack than the deb.
|
||||||
url = "https://www.greenfoot.org/download/files/Greenfoot-linux-${builtins.replaceStrings ["."] [""] version}.deb";
|
url = "https://www.greenfoot.org/download/files/Greenfoot-linux-${builtins.replaceStrings ["."] [""] version}.deb";
|
||||||
sha256 = "sha256-wGgKDsA/2luw+Nzs9dWb/HRHMx/0S0CFfoI53OCzxug=";
|
sha256 = "sha256-HDXmgLHS18VZVV+hCA0RgIrKRftOlV7t+fvE0pAHGjk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ dpkg wrapGAppsHook ];
|
||||||
|
buildInputs = [ glib ];
|
||||||
|
|
||||||
unpackPhase = ''
|
dontWrapGApps = true;
|
||||||
ar xf $src
|
|
||||||
tar xf data.tar.xz
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r usr/* $out
|
cp -r usr/* $out
|
||||||
rm -r $out/share/greenfoot/jdk
|
|
||||||
rm -r $out/share/greenfoot/javafx
|
|
||||||
|
|
||||||
makeWrapper ${jdk}/bin/java $out/bin/greenfoot \
|
rm -r $out/share/greenfoot/jdk
|
||||||
--add-flags "-Djavafx.embed.singleThread=true -Dawt.useSystemAAFontSettings=on -Xmx512M -cp \"$out/share/greenfoot/bluej.jar\" bluej.Boot -greenfoot=true -bluej.compiler.showunchecked=false -greenfoot.scenarios=$out/share/doc/Greenfoot/scenarios -greenfoot.url.javadoc=file://$out/share/doc/Greenfoot/API"
|
rm -r $out/share/greenfoot/javafx-*.jar
|
||||||
|
|
||||||
|
makeWrapper ${openjdk}/bin/java $out/bin/greenfoot \
|
||||||
|
"''${gappsWrapperArgs[@]}" \
|
||||||
|
--add-flags "-Dawt.useSystemAAFontSettings=on -Xmx512M \
|
||||||
|
--add-opens javafx.graphics/com.sun.glass.ui=ALL-UNNAMED \
|
||||||
|
-cp $out/share/greenfoot/boot.jar bluej.Boot \
|
||||||
|
-greenfoot=true -bluej.compiler.showunchecked=false \
|
||||||
|
-greenfoot.scenarios=$out/share/doc/Greenfoot/scenarios \
|
||||||
|
-greenfoot.url.javadoc=file://$out/share/doc/Greenfoot/API"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -33,7 +43,8 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://www.greenfoot.org/";
|
homepage = "https://www.greenfoot.org/";
|
||||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||||
license = licenses.gpl2ClasspathPlus;
|
license = licenses.gpl2ClasspathPlus;
|
||||||
|
mainProgram = pname;
|
||||||
maintainers = [ maintainers.chvp ];
|
maintainers = [ maintainers.chvp ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31670,7 +31670,10 @@ with pkgs;
|
||||||
gpg-mdp = callPackage ../applications/misc/gpg-mdp { };
|
gpg-mdp = callPackage ../applications/misc/gpg-mdp { };
|
||||||
|
|
||||||
greenfoot = callPackage ../applications/editors/greenfoot {
|
greenfoot = callPackage ../applications/editors/greenfoot {
|
||||||
jdk = jetbrains.jdk;
|
openjdk = openjdk17.override {
|
||||||
|
enableJavaFX = true;
|
||||||
|
openjfx = openjfx17.override { withWebKit = true; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gspeech = callPackage ../applications/audio/gspeech { };
|
gspeech = callPackage ../applications/audio/gspeech { };
|
||||||
|
|
Loading…
Reference in a new issue