1 { lib, stdenv, fetchurl, openjdk, glib, dpkg, wrapGAppsHook3 }:
3 stdenv.mkDerivation rec {
8 # We use the deb here. First instinct might be to go for the "generic" JAR
9 # download, but that is actually a graphical installer that is much harder
10 # to unpack than the deb.
11 url = "https://www.greenfoot.org/download/files/Greenfoot-linux-${builtins.replaceStrings ["."] [""] version}.deb";
12 hash = "sha256-wpmgWtx2jTDjt+7p6HcjU/uy1PRmnAHpJ1rOYb+hV+U=";
15 nativeBuildInputs = [ dpkg wrapGAppsHook3 ];
16 buildInputs = [ glib ];
26 rm -r $out/share/greenfoot/jdk
27 rm -r $out/share/greenfoot/javafx-*.jar
29 makeWrapper ${openjdk}/bin/java $out/bin/greenfoot \
30 "''${gappsWrapperArgs[@]}" \
31 --add-flags "-Dawt.useSystemAAFontSettings=on -Xmx512M \
32 --add-opens javafx.graphics/com.sun.glass.ui=ALL-UNNAMED \
33 -cp $out/share/greenfoot/boot.jar bluej.Boot \
34 -greenfoot=true -bluej.compiler.showunchecked=false \
35 -greenfoot.scenarios=$out/share/doc/Greenfoot/scenarios \
36 -greenfoot.url.javadoc=file://$out/share/doc/Greenfoot/API"
42 description = "Simple integrated development environment for Java";
43 homepage = "https://www.greenfoot.org/";
44 sourceProvenance = with sourceTypes; [ binaryBytecode ];
45 license = licenses.gpl2ClasspathPlus;
46 mainProgram = "greenfoot";
47 maintainers = [ maintainers.chvp ];
48 platforms = platforms.linux;