2021-02-05 17:12:51 +00:00
|
|
|
{lib, stdenv, fetchurl, ant, jre, jdk}:
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "abcl";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "1.9.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
# or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-oStchPKINL2Yjjra4K0q1MxsRR2eRPPAhT0AcVjBmGk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir nix-tools
|
|
|
|
export PATH="$PWD/nix-tools:$PATH"
|
|
|
|
echo "echo nix-builder.localdomain" > nix-tools/hostname
|
|
|
|
chmod a+x nix-tools/*
|
|
|
|
|
|
|
|
hostname
|
|
|
|
'';
|
|
|
|
buildPhase = ''
|
|
|
|
ant
|
|
|
|
'';
|
2022-04-27 09:35:20 +00:00
|
|
|
# Fix for https://github.com/armedbear/abcl/issues/484
|
|
|
|
javaOpts =
|
|
|
|
lib.optionalString
|
|
|
|
(lib.versionAtLeast jre.version "17")
|
|
|
|
"--add-opens=java.base/java.util.jar=ALL-UNNAMED";
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
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/"
|
|
|
|
|
|
|
|
echo "#! ${stdenv.shell}" >> "$out/bin/abcl"
|
2022-04-27 09:35:20 +00:00
|
|
|
echo "${jre}/bin/java $javaOpts -cp \"$out/lib/abcl/abcl.jar:$out/lib/abcl/abcl-contrib.jar:\$CLASSPATH\" org.armedbear.lisp.Main \"\$@\"" >> "$out/bin/abcl"
|
2020-04-24 23:36:52 +00:00
|
|
|
chmod a+x "$out"/bin/*
|
|
|
|
'';
|
|
|
|
buildInputs = [jre ant jdk jre];
|
|
|
|
meta = {
|
2021-01-17 00:15:33 +00:00
|
|
|
description = "A JVM-based Common Lisp implementation";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.gpl3 ;
|
|
|
|
maintainers = [lib.maintainers.raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://common-lisp.net/project/armedbear/";
|
|
|
|
};
|
|
|
|
}
|