clasp: init at 2.2.0
This commit is contained in:
parent
6c96e30a3a
commit
a43b5237ed
@ -0,0 +1,60 @@
|
||||
diff --git a/repos.sexp b/repos.sexp
|
||||
index 2b2459655..ad346d8e5 100644
|
||||
--- a/repos.sexp
|
||||
+++ b/repos.sexp
|
||||
@@ -7,15 +7,15 @@
|
||||
((:name :ansi-test
|
||||
:repository "https://gitlab.common-lisp.net/yitzchak/ansi-test"
|
||||
:directory "dependencies/ansi-test/"
|
||||
- :branch "add-expected-failures")
|
||||
+ :commit "346cf2eb1133942054df8ce2125ed7e999b6d82b")
|
||||
(:name :cl-bench
|
||||
:repository "https://gitlab.common-lisp.net/ansi-test/cl-bench.git"
|
||||
:directory "dependencies/cl-bench/"
|
||||
- :branch "master")
|
||||
+ :commit "7d184b4ef2a6272f0e3de88f6c243edb20f7071a")
|
||||
(:name :cl-who
|
||||
:repository "https://github.com/edicl/cl-who.git"
|
||||
:directory "dependencies/cl-who/"
|
||||
- :branch "master")
|
||||
+ :commit "07dafe9b351c32326ce20b5804e798f10d4f273d")
|
||||
(:name :quicklisp-client
|
||||
:repository "https://github.com/quicklisp/quicklisp-client.git"
|
||||
:directory "dependencies/quicklisp-client/"
|
||||
@@ -23,15 +23,15 @@
|
||||
(:name :shasht
|
||||
:repository "https://github.com/yitzchak/shasht.git"
|
||||
:directory "dependencies/shasht/"
|
||||
- :branch "master")
|
||||
+ :commit "f38e866990c6b5381a854d63f7ea0227c87c2f6d")
|
||||
(:name :trivial-do
|
||||
:repository "https://github.com/yitzchak/trivial-do.git"
|
||||
:directory "dependencies/trivial-do/"
|
||||
- :branch "master")
|
||||
+ :commit "a19f93227cb80a6bec8846655ebcc7998020bd7e")
|
||||
(:name :trivial-gray-streams
|
||||
:repository "https://github.com/trivial-gray-streams/trivial-gray-streams.git"
|
||||
:directory "dependencies/trivial-gray-streams/"
|
||||
- :branch "master")
|
||||
+ :commit "2b3823edbc78a450db4891fd2b566ca0316a7876")
|
||||
(:name :acclimation
|
||||
:repository "https://github.com/robert-strandh/Acclimation.git"
|
||||
:directory "src/lisp/kernel/contrib/Acclimation/"
|
||||
@@ -128,7 +128,7 @@
|
||||
(:name :lparallel
|
||||
:repository "https://github.com/yitzchak/lparallel.git"
|
||||
:directory "src/lisp/kernel/contrib/lparallel/"
|
||||
- :branch "fix-asdf-feature"
|
||||
+ :commit "9c98bf629328b27a5a3fbb7a637afd1db439c00f"
|
||||
:extension :cando)
|
||||
(:name :parser.common-rules
|
||||
:repository "https://github.com/scymtym/parser.common-rules.git"
|
||||
@@ -152,7 +152,7 @@
|
||||
(:name :trivial-features ; Needed both by the host and eclasp
|
||||
:repository "https://github.com/yitzchak/trivial-features.git"
|
||||
:directory "src/lisp/kernel/contrib/trivial-features/"
|
||||
- :branch "asdf-feature")
|
||||
+ :commit "0008ef4f3376fb76f63c35ecee6573d0d0f98d57")
|
||||
(:name :trivial-garbage
|
||||
:repository "https://github.com/trivial-garbage/trivial-garbage.git"
|
||||
:directory "src/lisp/kernel/contrib/trivial-garbage/"
|
116
pkgs/development/compilers/clasp/default.nix
Normal file
116
pkgs/development/compilers/clasp/default.nix
Normal file
@ -0,0 +1,116 @@
|
||||
{ pkgs, lib, fetchFromGitHub, llvmPackages_15
|
||||
# For packages
|
||||
, asdf_3_3
|
||||
, commonLispPackagesFor
|
||||
, lispWithPackages
|
||||
, build-asdf-system
|
||||
, spec ? { faslExt = "fasp"; program = "clasp"; flags = ""; asdf = asdf_3_3; }
|
||||
, packageOverrides ? (self: super: {})
|
||||
, ...}:
|
||||
|
||||
|
||||
let
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "clasp-developers";
|
||||
repo = "clasp";
|
||||
rev = "2.2.0";
|
||||
hash = "sha256-gvUqUb0dftW1miiBcAPJur0wOunox4y2SUYeeJpR9R4=";
|
||||
};
|
||||
|
||||
reposDirs = [
|
||||
"dependencies"
|
||||
"src/lisp/kernel/contrib"
|
||||
"src/lisp/modules/asdf"
|
||||
"src/mps"
|
||||
"src/bdwgc"
|
||||
"src/libatomic_ops"
|
||||
];
|
||||
|
||||
reposTarball = llvmPackages_15.stdenv.mkDerivation {
|
||||
pname = "clasp-repos";
|
||||
version = "tarball";
|
||||
inherit src;
|
||||
patches = [ ./clasp-pin-repos-commits.patch ];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
sbcl
|
||||
git
|
||||
cacert
|
||||
];
|
||||
buildPhase = ''
|
||||
export SOURCE_DATE_EPOCH=1
|
||||
export ASDF_OUTPUT_TRANSLATIONS=$(pwd):$(pwd)/__fasls
|
||||
sbcl --script koga --help
|
||||
for x in {${lib.concatStringsSep "," reposDirs}}; do
|
||||
find $x -type d -name .git -exec rm -rvf {} \; || true
|
||||
done
|
||||
'';
|
||||
installPhase = ''
|
||||
tar --owner=0 --group=0 --numeric-owner --format=gnu \
|
||||
--sort=name --mtime="@$SOURCE_DATE_EPOCH" \
|
||||
-czf $out ${lib.concatStringsSep " " reposDirs}
|
||||
'';
|
||||
outputHashMode = "flat";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "sha256-vgwThjn2h3nKnShtKoHgaPdH/FDHv28fLMQvKFEwG6o=";
|
||||
};
|
||||
|
||||
clasp = llvmPackages_15.stdenv.mkDerivation {
|
||||
pname = "clasp";
|
||||
version = "2.2.0";
|
||||
inherit src;
|
||||
nativeBuildInputs = (with pkgs; [
|
||||
sbcl
|
||||
git
|
||||
pkg-config
|
||||
fmt
|
||||
gmpxx
|
||||
libelf
|
||||
boost
|
||||
libunwind
|
||||
ninja
|
||||
]) ++ (with llvmPackages_15; [
|
||||
llvm
|
||||
libclang
|
||||
]);
|
||||
configurePhase = ''
|
||||
export SOURCE_DATE_EPOCH=1
|
||||
export ASDF_OUTPUT_TRANSLATIONS=$(pwd):$(pwd)/__fasls
|
||||
tar xf ${reposTarball}
|
||||
sbcl --script koga \
|
||||
--skip-sync \
|
||||
--cc=$NIX_CC/bin/cc \
|
||||
--cxx=$NIX_CC/bin/c++ \
|
||||
--reproducible-build \
|
||||
--package-path=/ \
|
||||
--bin-path=$out/bin \
|
||||
--lib-path=$out/lib \
|
||||
--share-path=$out/share
|
||||
'';
|
||||
buildPhase = ''
|
||||
ninja -C build
|
||||
'';
|
||||
installPhase = ''
|
||||
ninja -C build install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A Common Lisp implementation based on LLVM with C++ integration";
|
||||
license = lib.licenses.lgpl21Plus ;
|
||||
maintainers = [lib.maintainers.raskin lib.maintainers.uthar];
|
||||
platforms = lib.platforms.linux;
|
||||
homepage = "https://github.com/clasp-developers/clasp";
|
||||
};
|
||||
|
||||
# For packages
|
||||
passthru = let
|
||||
spec' = spec // { pkg = clasp; };
|
||||
pkgs = (commonLispPackagesFor spec').overrideScope' packageOverrides;
|
||||
in {
|
||||
inherit pkgs;
|
||||
withPackages = lispWithPackages pkgs;
|
||||
buildASDFSystem = args: build-asdf-system (args // spec');
|
||||
};
|
||||
|
||||
};
|
||||
in clasp
|
Loading…
Reference in New Issue
Block a user