Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 66 lines 1.5 kB view raw
1{ lib 2, stdenv 3, writeShellScriptBin 4, fetchurl 5, ant 6, jdk 7, makeWrapper 8, stripJavaArchivesHook 9}: 10 11let 12 fakeHostname = writeShellScriptBin "hostname" '' 13 echo nix-builder.localdomain 14 ''; 15in 16stdenv.mkDerivation (finalAttrs: { 17 pname = "abcl"; 18 version = "1.9.2"; 19 20 src = fetchurl { 21 url = "https://common-lisp.net/project/armedbear/releases/${finalAttrs.version}/abcl-src-${finalAttrs.version}.tar.gz"; 22 hash = "sha256-Ti9Lj4Xi2V2V5b282foXrWExoX4vzxK8Gf+5e0i8HTg="; 23 }; 24 25 # note for the future: 26 # if you use makeBinaryWrapper, you will trade bash for glibc, the closure will be slightly larger 27 nativeBuildInputs = [ 28 ant 29 jdk 30 fakeHostname 31 makeWrapper 32 stripJavaArchivesHook 33 ]; 34 35 buildPhase = '' 36 runHook preBuild 37 38 ant \ 39 -Dabcl.runtime.jar.path="$out/lib/abcl/abcl.jar" \ 40 -Dadditional.jars="$out/lib/abcl/abcl-contrib.jar" 41 42 runHook postBuild 43 ''; 44 45 installPhase = '' 46 runHook preInstall 47 48 mkdir -p "$out"/{share/doc/abcl,lib/abcl} 49 cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/" 50 cp -r dist/*.jar contrib/ "$out/lib/abcl/" 51 install -Dm555 abcl -t $out/bin 52 53 runHook postInstall 54 ''; 55 56 passthru.updateScript = ./update.sh; 57 58 meta = { 59 description = "JVM-based Common Lisp implementation"; 60 homepage = "https://common-lisp.net/project/armedbear/"; 61 license = lib.licenses.gpl2Classpath; 62 mainProgram = "abcl"; 63 maintainers = lib.teams.lisp.members; 64 platforms = lib.platforms.darwin ++ lib.platforms.linux; 65 }; 66})