Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, lib 3, fetchurl 4, ant 5, jre 6, jdk 7, makeWrapper 8}: 9 10stdenv.mkDerivation rec { 11 pname = "abcl"; 12 version = "1.9.1"; 13 14 src = fetchurl { 15 url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz"; 16 sha256 = "sha256-pbxnfJRB9KgzwgpUG93Rb/+SZIRmkd6aHa9mmfj/EeI="; 17 }; 18 19 configurePhase = '' 20 runHook preConfigure 21 22 mkdir nix-tools 23 export PATH="$PWD/nix-tools:$PATH" 24 echo "echo nix-builder.localdomain" > nix-tools/hostname 25 chmod a+x nix-tools/* 26 27 hostname 28 29 runHook postConfigure 30 ''; 31 32 buildInputs = [ jre ]; 33 34 # note for the future: 35 # if you use makeBinaryWrapper, you will trade bash for glibc, the closure will be slightly larger 36 nativeBuildInputs = [ makeWrapper ant jdk ]; 37 38 buildPhase = '' 39 runHook preBuild 40 41 ant 42 43 runHook postBuild 44 ''; 45 46 installPhase = '' 47 runHook preInstall 48 49 mkdir -p "$out"/{bin,share/doc/abcl,lib/abcl} 50 cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/" 51 cp -r dist/*.jar contrib/ "$out/lib/abcl/" 52 53 makeWrapper ${jre}/bin/java $out/bin/abcl \ 54 --prefix CLASSPATH : $out/lib/abcl/abcl.jar \ 55 --prefix CLASSPATH : $out/lib/abcl/abcl-contrib.jar \ 56 ${lib.optionalString (lib.versionAtLeast jre.version "17") 57 # Fix for https://github.com/armedbear/abcl/issues/484 58 "--add-flags --add-opens=java.base/java.util.jar=ALL-UNNAMED \\" 59 } 60 --add-flags org.armedbear.lisp.Main 61 62 runHook postInstall 63 ''; 64 65 passthru.updateScript = ./update.sh; 66 67 meta = { 68 description = "A JVM-based Common Lisp implementation"; 69 license = lib.licenses.gpl3 ; 70 maintainers = lib.teams.lisp.members; 71 platforms = lib.platforms.linux; 72 homepage = "https://common-lisp.net/project/armedbear/"; 73 }; 74}