at 18.03-beta 40 lines 1.4 kB view raw
1{stdenv, fetchurl, ant, jre, jdk}: 2stdenv.mkDerivation rec { 3 name = "${pname}-${version}"; 4 pname = "abcl"; 5 version = "1.5.0"; 6 # or fetchFromGitHub(owner,repo,rev) or fetchgit(rev) 7 src = fetchurl { 8 url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz"; 9 sha256 = "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"; 10 }; 11 configurePhase = '' 12 mkdir nix-tools 13 export PATH="$PWD/nix-tools:$PATH" 14 echo "echo nix-builder.localdomain" > nix-tools/hostname 15 chmod a+x nix-tools/* 16 17 hostname 18 ''; 19 buildPhase = '' 20 ant 21 ''; 22 installPhase = '' 23 mkdir -p "$out"/{bin,share/doc/abcl,lib/abcl} 24 cp -r README COPYING CHANGES examples/ "$out/share/doc/abcl/" 25 cp -r dist/*.jar contrib/ "$out/lib/abcl/" 26 27 echo "#! ${stdenv.shell}" >> "$out/bin/abcl" 28 echo "${jre}/bin/java -cp \"$out/lib/abcl/abcl.jar:$out/lib/abcl/abcl-contrib.jar:\$CLASSPATH\" org.armedbear.lisp.Main \"\$@\"" >> "$out/bin/abcl" 29 chmod a+x "$out"/bin/* 30 ''; 31 buildInputs = [jre ant jdk jre]; 32 meta = { 33 inherit version; 34 description = ''A JVM-based Common Lisp implementation''; 35 license = stdenv.lib.licenses.gpl3 ; 36 maintainers = [stdenv.lib.maintainers.raskin]; 37 platforms = stdenv.lib.platforms.linux; 38 homepage = https://common-lisp.net/project/armedbear/; 39 }; 40}