cl-rw

Layered streams for Common Lisp
git clone https://logand.com/git/cl-rw.git/
Log | Files | Refs

commit 7193f06810da939f0f2c80eb800cd78965787f22
parent 170881fba73c75207c75d0e614da2bc28b206892
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun,  5 Jul 2015 14:17:39 +0200

nix build

Diffstat:
Adefault.nix | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Arelease.nix | 13+++++++++++++
Ashell.nix | 1+
3 files changed, 75 insertions(+), 0 deletions(-)

diff --git a/default.nix b/default.nix @@ -0,0 +1,61 @@ +{stdenv, fetchgit, sbcl, ccl, ecl, mkcl, lisptype, demo}: + +stdenv.mkDerivation rec { + name = "cl-rw-demo-${demo}-${lisptype}"; + + src = fetchgit { + url = http://logand.com/git/cl-rw.git; + rev = "ec5632cbea261e4fba765d9811b365b3efcb5bde"; + sha256 = "03w7rah4bkzqw2m47jrb0nhwcsk3qq90nqd193b7qbcdwjkr6l4b"; + }; + + buildInputs = [sbcl ccl ecl mkcl]; + + buildPhase = '' + export ASDF_OUTPUT_TRANSLATIONS=/:$(pwd)/cache/: + '' + + (if "sbcl" == "${lisptype}" then '' + sbcl \ + --lose-on-corruption \ + --disable-ldb \ + --disable-debugger \ + --no-sysinit \ + --no-userinit \ + --load "${sbcl}/lib/sbcl/contrib/asdf" \ + --eval '(push (truename "./") asdf:*central-registry*)' \ + --eval '(require :cl-rw-demo-${demo})' \ + --eval '(rw.demo.${demo}::save-image)' + '' else "") + + (if "ccl" == "${lisptype}" then '' + lx86cl64 -K utf-8 -n \ + -l "${ccl}/share/ccl-installation/tools/asdf" \ + -e '(push (truename "./") asdf:*central-registry*)' \ + -e '(require :cl-rw-demo-${demo})' \ + -e '(rw.demo.${demo}::save-image)' + '' else "") + + (if "ecl" == "${lisptype}" then '' + find ${ecl} + ecl \ + -norc \ + -load "${ccl}/share/ccl-installation/tools/asdf" \ + -eval '(push (truename "./") asdf:*central-registry*)' \ + -eval '(require :cl-rw-demo-${demo})' \ + -eval '(rw.demo.${demo}::save-image)' + '' else "") + + (if "mkcl" == "${lisptype}" then '' + mkcl \ + -norc \ + -load "${ccl}/share/ccl-installation/tools/asdf" \ + -eval '(push (truename "./") asdf:*central-registry*)' \ + -eval '(require :cl-rw-demo-${demo})' \ + -eval '(rw.demo.${demo}::save-image)' + '' else ""); + + dontPatchELF = true; + dontStrip = true; + + installPhase = '' + mkdir -p $out/bin + cp cl-rw-demo-${demo} $out/bin/${name} + ''; +} diff --git a/release.nix b/release.nix @@ -0,0 +1,13 @@ +let + pkgs = import <nixpkgs> {}; + demo = demo: lisptype: pkgs.callPackage ./. {demo = demo; lisptype = lisptype;}; +in { + cl-rw-demo-counter-sbcl = demo "counter" "sbcl"; + cl-rw-demo-counter-ccl = demo "counter" "ccl"; + #cl-rw-demo-counter-ecl = demo "counter" "ecl"; + #cl-rw-demo-counter-mkcl = demo "counter" "mkcl"; + cl-rw-demo-zappel-sbcl = demo "zappel" "sbcl"; + cl-rw-demo-zappel-ccl = demo "zappel" "ccl"; + #cl-rw-demo-zappel-ecl = demo "zappel" "ecl"; + #cl-rw-demo-zappel-mkcl = demo "zappel" "mkcl"; +} diff --git a/shell.nix b/shell.nix @@ -0,0 +1 @@ +(import <nixpkgs> {}).callPackage ./. {demo = "counter"; lisptype = "sbcl";}