Files
nixpkgs/pkgs/development/compilers/abcl/default.nix
T
Tomodachi94 a4dd7db0dc treewide(java-users): clean callPackage overrides, by-name some
**This commit should cause no rebuilds.**

# Moving Java overrides out of all-packages

All usages of this pattern have been moved to
'let ... in' blocks.

Patterns I searched for:
* `jdk =`
* `jdk_headless =`
* `jre =`
* `jfx =`

The `jing` alias has been moved to aliases.nix, so
update the usage of `jing` in `xmloscopy` to
`jing-trang`.

cassandra was ignored because that derivation
involves code generation.

I ignored grails, because jdk is set to null by
default by an override in all-packages.nix. That
package would need a slightly larger refactor to
deal with.

Packages with a *-native variant were ignored because
those would need to be refactored.

jetbrains was ignored because that might be a special case?

I ignored virtualbox, because I did not want
to touch the usages of the pattern for other
dependencies.
2025-09-25 03:46:35 +00:00

75 lines
1.6 KiB
Nix

{
lib,
stdenv,
writeShellScriptBin,
fetchurl,
ant,
openjdk17,
makeWrapper,
stripJavaArchivesHook,
}:
let
# https://armedbear.common-lisp.dev/ lists OpenJDK 17 as the highest
# supported JDK.
jdk = openjdk17;
fakeHostname = writeShellScriptBin "hostname" ''
echo nix-builder.localdomain
'';
in
stdenv.mkDerivation (finalAttrs: {
pname = "abcl";
version = "1.9.3";
src = fetchurl {
url = "https://common-lisp.net/project/armedbear/releases/${finalAttrs.version}/abcl-src-${finalAttrs.version}.tar.gz";
hash = "sha256-uwShIj06mGCS4BD/2tE69QQp1VwagYdL8wIvlDa/sv8=";
};
# note for the future:
# if you use makeBinaryWrapper, you will trade bash for glibc, the closure will be slightly larger
nativeBuildInputs = [
ant
jdk
fakeHostname
makeWrapper
stripJavaArchivesHook
];
buildPhase = ''
runHook preBuild
ant \
-Dabcl.runtime.jar.path="$out/lib/abcl/abcl.jar" \
-Dadditional.jars="$out/lib/abcl/abcl-contrib.jar"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out"/{share/doc/abcl,lib/abcl}
cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/"
cp -r dist/*.jar contrib/ "$out/lib/abcl/"
install -Dm555 abcl -t $out/bin
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
description = "JVM-based Common Lisp implementation";
homepage = "https://common-lisp.net/project/armedbear/";
license = with lib.licenses; [
gpl2
classpathException20
];
mainProgram = "abcl";
teams = [ lib.teams.lisp ];
platforms = lib.platforms.darwin ++ lib.platforms.linux;
};
})