From eb5d51d4cfb3559ed2e1127ff80b94396a5b438f Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 11 Jan 2019 16:29:19 +0100 Subject: [PATCH] clasp-common-lisp: update/fix build, 2018-11-28 prerelease (towards 0.9) --- pkgs/development/compilers/clasp/default.nix | 105 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 5 +- 2 files changed, 95 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/clasp/default.nix b/pkgs/development/compilers/clasp/default.nix index 349482fbde97..a1e29951ddb5 100644 --- a/pkgs/development/compilers/clasp/default.nix +++ b/pkgs/development/compilers/clasp/default.nix @@ -1,54 +1,131 @@ -{ stdenv, fetchFromGitHub +{ stdenv, fetchFromGitHub, fetchFromGitLab , llvmPackages -, cmake, boehmgc, gmp, zlib, ncurses, boost +, cmake, boehmgc, gmp, zlib, ncurses, boost, libelf , python, git, sbcl , wafHook }: +let + sicl = fetchFromGitHub { + owner = "Bike"; + repo = "SICL"; + rev = "78052fb5f02a3814eb7295f3dcac09f21f98702b"; + sha256 = "0wnmp40310ls6q9gkr5ysfkj2qirq26ljjicnkqifc53mm0ghz4i"; + }; + cst = fetchFromGitHub { + owner = "robert-strandh"; + repo = "Concrete-Syntax-Tree"; + rev = "8d8c5abf8f1690cb2b765241d81c2eb86d60d77e"; + sha256 = "1rs8a5nbfffdyli126sccd0z1a8h5axp222b4pgwvgfxsb9w7g3s"; + }; + c2mop = fetchFromGitHub { + owner = "pcostanza"; + repo = "closer-mop"; + rev = "d4d1c7aa6aba9b4ac8b7bb78ff4902a52126633f"; + sha256 = "1amcv0f3vbsq0aqhai7ki5bi367giway1pbfxyc47r7q3hq5hw3c"; + }; + acclimation = fetchFromGitHub { + owner = "robert-strandh"; + repo = "Acclimation"; + rev = "dd15c86b0866fc5d8b474be0da15c58a3c04c45c"; + sha256 = "0ql224qs3zgflvdhfbca621v3byhhqfb71kzy70bslyczxv1bsh2"; + }; + eclector = fetchFromGitHub { + owner = "robert-strandh"; + repo = "Eclector"; + rev = "287ce817c0478668bd389051d2cc6b26ddc62ec9"; + sha256 = "0v7mgkq49ddyx5vvsradcp772y5l7cv9xrll3280hyginpm8w6q3"; + }; + alexandria = fetchFromGitHub { + owner = "clasp-developers"; + repo = "alexandria"; + rev = "e5c54bc30b0887c237bde2827036d17315f88737"; + sha256 = "14h7a9fwimiw9gqxjm2h47d95bfhrm7b81f6si7x8vy18d78fn4g"; + }; + mps = fetchFromGitHub { + owner = "Ravenbrook"; + repo = "mps"; + rev = "b8a05a3846430bc36c8200f24d248c8293801503"; + sha256 = "1q2xqdw832jrp0w9yhgr8xihria01j4z132ac16lr9ssqznkprv6"; + }; + asdf = fetchFromGitLab { + domain = "gitlab.common-lisp.net"; + owner = "asdf"; + repo = "asdf"; + rev = "3.3.1.2"; + sha256 = "0ljr2vc0cb2wrijcyjmp9hcaj2bdhh05ci3zf4f43hdq6i2fgg6g"; + }; +in stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "clasp"; - version = "0.4.99.20170801"; + version = "0.8.99.20181128"; src = fetchFromGitHub { owner = "drmeister"; repo = "clasp"; - rev = "525ce1cffff39311e3e7df6d0b71fa267779bdf5"; - sha256 = "1jqya04wybgxnski341p5sycy2gysxad0s5q8d59z0f6ckj3v8k1"; + rev = "2f2b52ccb750048460562b5987a7eaf7a1aa4445"; + sha256 = "0ra55vdnk59lygwzlxr5cg16vb9c45fmg59wahaxclwm461w7fwz"; fetchSubmodules = true; }; - nativeBuildInputs = [ cmake python git sbcl wafHook ]; + nativeBuildInputs = [ cmake python git sbcl wafHook ] ++ + (with llvmPackages; [ llvm clang ]); - buildInputs = with llvmPackages; ( - builtins.map (x: stdenv.lib.overrideDerivation x - (x: {NIX_CFLAGS_COMPILE= (x.NIX_CFLAGS_COMPILE or "") + " -frtti"; })) - [ llvm clang clang-unwrapped clang ]) ++ + buildInputs = with llvmPackages; + ( + builtins.map (x: stdenv.lib.overrideDerivation x + (x: {NIX_CFLAGS_COMPILE= (x.NIX_CFLAGS_COMPILE or "") + " -frtti"; })) + [ llvm clang clang-unwrapped clang ]) ++ [ gmp zlib ncurses - boost boehmgc + boost boehmgc libelf (boost.override {enableStatic = true; enableShared = false;}) (stdenv.lib.overrideDerivation boehmgc (x: {configureFlags = (x.configureFlags or []) ++ ["--enable-static"];})) ]; - NIX_CFLAGS_COMPILE = " -frtti "; + NIX_CXXSTDLIB_COMPILE = " -frtti "; postPatch = '' echo " - INSTALL_PATH_PREFIX = '$out' + PREFIX = '$out' " | sed -e 's/^ *//' > wscript.config + + mkdir -p src/lisp/kernel/contrib/sicl + mkdir -p src/lisp/kernel/contrib/Concrete-Syntax-Tree + mkdir -p src/lisp/kernel/contrib/closer-mop + mkdir -p src/lisp/kernel/contrib/Acclimation + mkdir -p src/lisp/kernel/contrib/Eclector + mkdir -p src/lisp/kernel/contrib/alexandria + mkdir -p src/mps + mkdir -p src/lisp/modules/asdf + + cp -rfT "${sicl}" src/lisp/kernel/contrib/sicl + cp -rfT "${cst}" src/lisp/kernel/contrib/Concrete-Syntax-Tree + cp -rfT "${c2mop}" src/lisp/kernel/contrib/closer-mop + cp -rfT "${acclimation}" src/lisp/kernel/contrib/Acclimation + cp -rfT "${eclector}" src/lisp/kernel/contrib/Eclector + cp -rfT "${alexandria}" src/lisp/kernel/contrib/alexandria + cp -rfT "${mps}" src/mps + cp -rfT "${asdf}" src/lisp/modules/asdf + + chmod -R u+rwX src + ( cd src/lisp/modules/asdf; make ) ''; buildTargets = "build_cboehm"; installTargets = "install_cboehm"; + CLASP_SRC_DONTTOUCH = "true"; + meta = { inherit version; description = ''A Common Lisp implementation based on LLVM with C++ integration''; license = stdenv.lib.licenses.lgpl21Plus ; maintainers = [stdenv.lib.maintainers.raskin]; platforms = stdenv.lib.platforms.linux; + # Large, long to build, a private build of clang is needed, a prerelease. + hydraPlatforms = []; homepage = "https://github.com/drmeister/clasp"; - broken = true; # 2018-09-08, no successful build since 2018-01-03 }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0f2ed083a28f..d38e95e180f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6670,7 +6670,10 @@ in clang-sierraHack-stdenv = overrideCC stdenv clang-sierraHack; libcxxStdenv = if stdenv.isDarwin then stdenv else lowPrio llvmPackages.libcxxStdenv; - clasp-common-lisp = callPackage ../development/compilers/clasp {}; + clasp-common-lisp = callPackage ../development/compilers/clasp { + llvmPackages = llvmPackages_6; + stdenv = llvmPackages_6.stdenv; + }; clean = callPackage ../development/compilers/clean { };