nixpkgs/pkgs/development/compilers/abcl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.7 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchurl
, ant
, jre
, jdk
, makeWrapper
}:
2016-12-13 15:25:04 +00:00
stdenv.mkDerivation rec {
pname = "abcl";
2023-03-26 12:19:32 +00:00
version = "1.9.1";
2016-12-13 15:25:04 +00:00
src = fetchurl {
url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz";
2023-03-26 12:19:32 +00:00
sha256 = "sha256-pbxnfJRB9KgzwgpUG93Rb/+SZIRmkd6aHa9mmfj/EeI=";
2016-12-13 15:25:04 +00:00
};
2016-12-13 15:25:04 +00:00
configurePhase = ''
runHook preConfigure
2016-12-13 15:25:04 +00:00
mkdir nix-tools
export PATH="$PWD/nix-tools:$PATH"
echo "echo nix-builder.localdomain" > nix-tools/hostname
chmod a+x nix-tools/*
hostname
runHook postConfigure
2016-12-13 15:25:04 +00:00
'';
buildInputs = [ jre ];
# note for the future:
# if you use makeBinaryWrapper, you will trade bash for glibc, the closure will be slightly larger
nativeBuildInputs = [ makeWrapper ant jdk ];
2016-12-13 15:25:04 +00:00
buildPhase = ''
runHook preBuild
2016-12-13 15:25:04 +00:00
ant
runHook postBuild
2016-12-13 15:25:04 +00:00
'';
2016-12-13 15:25:04 +00:00
installPhase = ''
runHook preInstall
2016-12-13 15:25:04 +00:00
mkdir -p "$out"/{bin,share/doc/abcl,lib/abcl}
cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/"
cp -r dist/*.jar contrib/ "$out/lib/abcl/"
makeWrapper ${jre}/bin/java $out/bin/abcl \
--prefix CLASSPATH : $out/lib/abcl/abcl.jar \
--prefix CLASSPATH : $out/lib/abcl/abcl-contrib.jar \
${lib.optionalString (lib.versionAtLeast jre.version "17")
# Fix for https://github.com/armedbear/abcl/issues/484
"--add-flags --add-opens=java.base/java.util.jar=ALL-UNNAMED \\"
}
--add-flags org.armedbear.lisp.Main
runHook postInstall
2016-12-13 15:25:04 +00:00
'';
passthru.updateScript = ./update.sh;
2016-12-13 15:25:04 +00:00
meta = {
description = "A JVM-based Common Lisp implementation";
license = lib.licenses.gpl3 ;
maintainers = lib.teams.lisp.members;
platforms = lib.platforms.linux;
homepage = "https://common-lisp.net/project/armedbear/";
2016-12-13 15:25:04 +00:00
};
}