4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ lib, 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 lib; {
|
|
description = "A simple integrated development environment for Java";
|
|
homepage = "https://www.bluej.org/";
|
|
license = licenses.gpl2ClasspathPlus;
|
|
maintainers = [ maintainers.charvp ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|