at v206 1.1 kB view raw
1{stdenv, fetchurl}: 2 3let 4 inherit (stdenv) system; 5 version = "21a"; 6 downloadUrl = arch: 7 "http://common-lisp.net/project/cmucl/downloads/release/" + 8 "${version}/cmucl-${version}-${arch}.tar.bz2"; 9 fetchDist = {arch, sha256}: fetchurl { 10 url = downloadUrl arch; 11 inherit sha256; 12 }; 13 dist = 14 if system == "i686-linux" then fetchDist { 15 arch = "x86-linux"; 16 sha256 = "0w8dcaiasfd4fbj340zaf6wcjfgc4wzkvr24gbxa5rr3aw10rl02"; 17 } 18 else throw "Unsupported platform for cmucl."; 19in 20 21stdenv.mkDerivation { 22 name = "cmucl-binary-${version}"; 23 24 buildCommand = '' 25 mkdir -p $out 26 tar -C $out -xjf ${dist} 27 patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 28 $out/bin/lisp 29 ''; 30 31 meta = { 32 description = "The CMU implementation of Common Lisp"; 33 longDescription = '' 34 CMUCL is a free implementation of the Common Lisp programming language 35 which runs on most major Unix platforms. It mainly conforms to the 36 ANSI Common Lisp standard. 37 ''; 38 license = stdenv.lib.licenses.free; # public domain 39 homepage = http://www.cons.org/cmucl/; 40 }; 41}