summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2017-10-24 08:42:26 +0200
committerMichael Raskin <7c6f434c@mail.ru>2017-10-24 08:43:41 +0200
commit5fe5afe8ee15ac06c83bd4ff446421d998f35831 (patch)
treea73c3c8220e2aa2a7ffd2768d1535abdaaa40959 /pkgs/development/compilers
parent83d7fe0f0d062f19500b9befd1338ff2a13d8535 (diff)
downloadnixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.tar
nixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.tar.gz
nixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.tar.bz2
nixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.tar.lz
nixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.tar.xz
nixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.tar.zst
nixpkgs-5fe5afe8ee15ac06c83bd4ff446421d998f35831.zip
clasp-common-lisp: init at 0.4.99.20170801
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/clasp/default.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/development/compilers/clasp/default.nix b/pkgs/development/compilers/clasp/default.nix
new file mode 100644
index 00000000000..6bfb71a9627
--- /dev/null
+++ b/pkgs/development/compilers/clasp/default.nix
@@ -0,0 +1,74 @@
+{stdenv, fetchFromGitHub
+  , llvmPackages
+  , cmake, boehmgc, gmp, zlib, ncurses, boost
+  , waf, python, git, sbcl
+}:
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "clasp";
+  version = "0.4.99.20170801";
+
+  src = fetchFromGitHub {
+    owner = "drmeister";
+    repo = "clasp";
+    rev = "525ce1cffff39311e3e7df6d0b71fa267779bdf5";
+    sha256 = "1jqya04wybgxnski341p5sycy2gysxad0s5q8d59z0f6ckj3v8k1";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake python git sbcl ];
+
+  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.override {enableStatic = true; enableShared = false;})
+    (stdenv.lib.overrideDerivation boehmgc
+      (x: {configureFlags = (x.configureFlags or []) ++ ["--enable-static"];}))
+  ];
+
+  NIX_CFLAGS_COMPILE = " -frtti ";
+
+  configurePhase = ''
+    runHook preConfigure
+
+    export CXX=clang++
+    export CC=clang
+
+    echo "
+      INSTALL_PATH_PREFIX = '$out'
+    " | sed -e 's/^ *//' > wscript.config
+
+    python ./waf configure update_submodules
+
+    runHook postConfigure
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    python ./waf build_cboehm
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    python ./waf install_cboehm
+
+    runHook postInstall
+  '';
+
+  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;
+    homepage = "https://github.com/drmeister/clasp";
+  };
+}