at 18.03-beta 74 lines 1.8 kB view raw
1{stdenv, fetchFromGitHub 2 , llvmPackages 3 , cmake, boehmgc, gmp, zlib, ncurses, boost 4 , waf, python, git, sbcl 5}: 6stdenv.mkDerivation rec { 7 name = "${pname}-${version}"; 8 pname = "clasp"; 9 version = "0.4.99.20170801"; 10 11 src = fetchFromGitHub { 12 owner = "drmeister"; 13 repo = "clasp"; 14 rev = "525ce1cffff39311e3e7df6d0b71fa267779bdf5"; 15 sha256 = "1jqya04wybgxnski341p5sycy2gysxad0s5q8d59z0f6ckj3v8k1"; 16 fetchSubmodules = true; 17 }; 18 19 nativeBuildInputs = [ cmake python git sbcl ]; 20 21 buildInputs = with llvmPackages; ( 22 builtins.map (x: stdenv.lib.overrideDerivation x 23 (x: {NIX_CFLAGS_COMPILE= (x.NIX_CFLAGS_COMPILE or "") + " -frtti"; })) 24 [ llvm clang clang-unwrapped clang ]) ++ 25 [ 26 gmp zlib ncurses 27 boost boehmgc 28 (boost.override {enableStatic = true; enableShared = false;}) 29 (stdenv.lib.overrideDerivation boehmgc 30 (x: {configureFlags = (x.configureFlags or []) ++ ["--enable-static"];})) 31 ]; 32 33 NIX_CFLAGS_COMPILE = " -frtti "; 34 35 configurePhase = '' 36 runHook preConfigure 37 38 export CXX=clang++ 39 export CC=clang 40 41 echo " 42 INSTALL_PATH_PREFIX = '$out' 43 " | sed -e 's/^ *//' > wscript.config 44 45 python ./waf configure update_submodules 46 47 runHook postConfigure 48 ''; 49 50 buildPhase = '' 51 runHook preBuild 52 53 python ./waf build_cboehm 54 55 runHook postBuild 56 ''; 57 58 installPhase = '' 59 runHook preInstall 60 61 python ./waf install_cboehm 62 63 runHook postInstall 64 ''; 65 66 meta = { 67 inherit version; 68 description = ''A Common Lisp implementation based on LLVM with C++ integration''; 69 license = stdenv.lib.licenses.lgpl21Plus ; 70 maintainers = [stdenv.lib.maintainers.raskin]; 71 platforms = stdenv.lib.platforms.linux; 72 homepage = "https://github.com/drmeister/clasp"; 73 }; 74}