summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/bluej
diff options
context:
space:
mode:
authorCharlotte Van Petegem <charlotte@vanpetegem.me>2020-09-18 11:28:53 +0200
committerCharlotte Van Petegem <charlotte@vanpetegem.me>2020-09-21 09:31:18 +0200
commit090cc5d6ea548221cd7ec61b10003a446cd9bca3 (patch)
treefa2274d27b92115f30e5187cdf09fa67afd2159b /pkgs/applications/editors/bluej
parent9ff87334e687e8754e324573b0df6e485480fa4e (diff)
bluej: init at 4.2.2
Diffstat (limited to 'pkgs/applications/editors/bluej')
-rw-r--r--pkgs/applications/editors/bluej/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/editors/bluej/default.nix b/pkgs/applications/editors/bluej/default.nix
new file mode 100644
index 000000000000..25caf4b7ac7f
--- /dev/null
+++ b/pkgs/applications/editors/bluej/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchurl, makeWrapper, jdk }:
+
+stdenv.mkDerivation rec {
+ pname = "bluej";
+ version = "4.2.2";
+ src = fetchurl {
+ # 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
+ # to unpack than the deb.
+ url = "https://www.bluej.org/download/files/BlueJ-linux-${builtins.replaceStrings ["."] [""] version}.deb";
+ sha256 = "5c2241f2208e98fcf9aad7c7a282bcf16e6fd543faa5fdb0b99b34d1023113c3";
+ };
+
+ nativeBuildInputs = [ makeWrapper ];
+
+ unpackPhase = ''
+ ar xf $src
+ tar xf data.tar.xz
+ '';
+
+ installPhase = ''
+ mkdir -p $out
+ cp -r usr/* $out
+
+ makeWrapper ${jdk}/bin/java $out/bin/bluej \
+ --add-flags "-Djavafx.embed.singleThread=true -Dawt.useSystemAAFontSettings=on -Xmx512M -cp \"$out/share/bluej/bluej.jar\" bluej.Boot"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A simple integrated development environment for Java";
+ homepage = "https://www.bluej.org/";
+ license = licenses.gpl2ClasspathPlus;
+ maintainers = [ maintainers.charvp ];
+ platforms = platforms.unix;
+ };
+}