2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, writeShellScriptBin
|
2023-04-12 12:48:02 +00:00
|
|
|
, fetchurl
|
|
|
|
, ant
|
|
|
|
, jdk
|
|
|
|
, makeWrapper
|
2024-04-21 15:54:59 +00:00
|
|
|
, stripJavaArchivesHook
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
let
|
|
|
|
fakeHostname = writeShellScriptBin "hostname" ''
|
|
|
|
echo nix-builder.localdomain
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "abcl";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "1.9.2";
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2024-01-13 08:15:51 +00:00
|
|
|
url = "https://common-lisp.net/project/armedbear/releases/${finalAttrs.version}/abcl-src-${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-Ti9Lj4Xi2V2V5b282foXrWExoX4vzxK8Gf+5e0i8HTg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
# note for the future:
|
|
|
|
# if you use makeBinaryWrapper, you will trade bash for glibc, the closure will be slightly larger
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
ant
|
|
|
|
jdk
|
|
|
|
fakeHostname
|
|
|
|
makeWrapper
|
2024-04-21 15:54:59 +00:00
|
|
|
stripJavaArchivesHook
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPhase = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
ant \
|
|
|
|
-Dabcl.runtime.jar.path="$out/lib/abcl/abcl.jar" \
|
|
|
|
-Dadditional.jars="$out/lib/abcl/abcl-contrib.jar"
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2023-04-12 12:48:02 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
mkdir -p "$out"/{share/doc/abcl,lib/abcl}
|
2020-04-24 23:36:52 +00:00
|
|
|
cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/"
|
|
|
|
cp -r dist/*.jar contrib/ "$out/lib/abcl/"
|
2024-07-01 15:47:52 +00:00
|
|
|
install -Dm555 abcl -t $out/bin
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "JVM-based Common Lisp implementation";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://common-lisp.net/project/armedbear/";
|
|
|
|
license = lib.licenses.gpl2Classpath;
|
|
|
|
mainProgram = "abcl";
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = lib.teams.lisp.members;
|
2023-07-15 17:15:38 +00:00
|
|
|
platforms = lib.platforms.darwin ++ lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-01-13 08:15:51 +00:00
|
|
|
})
|