git.iko.soy/typeable/nixpkgs
on master help sign in
clisp-tip: init at 2.50pre20161201. There hasn't been a release for quite some time, but there has been some development. It is rumored that the fresh version can be built on darwin, but I don't know and cannot test
commitd7bda1ed40cc7271ea76477a1d63cdd2de8b70de authorMichael Raskin <7c6f434c@mail.ru> dateThu 29 Dec 2016, 17:36 (10 years ago) parent6d455dd
2 files changed+98
pkgs/development/interpreters/clisp/hg.nix+97 pkgs/top-level/all-packages.nix+1
pkgs/development/interpreters/clisp/hg.nixnew file+97
@@ -0,0 +1,97 @@
1+# there are the following linking sets:
2+# - boot (not installed): without modules, only used when building clisp
3+# - base (default): contains readline and i18n, regexp and syscalls modules
4+# by default
5+# - full: contains base plus modules in withModules
6+{ stdenv, fetchhg, libsigsegv, gettext, ncurses, readline, libX11
7+, libXau, libXt, pcre, zlib, libXpm, xproto, libXext, xextproto
8+, libffi
9+, libffcall
10+, coreutils
11+# build options
12+, threadSupport ? (stdenv.isi686 || stdenv.isx86_64)
13+, x11Support ? (stdenv.isi686 || stdenv.isx86_64)
14+, dllSupport ? true
15+, withModules ? [
16+ "pcre"
17+ "rawsock"
18+ ]
19+ ++ stdenv.lib.optionals stdenv.isLinux [ "bindings/glibc" "zlib" ]
20+ ++ stdenv.lib.optional x11Support "clx/new-clx"
21+}:
22+
23+assert x11Support -> (libX11 != null && libXau != null && libXt != null
24+ && libXpm != null && xproto != null && libXext != null && xextproto != null);
25+
26+stdenv.mkDerivation rec {
27+ v = "2.50pre20161201";
28+ name = "clisp-${v}";
29+
30+ src = fetchhg {
31+ url = "http://hg.code.sf.net/p/clisp/clisp";
32+ rev = "536a48";
33+ sha256 = "097igsfpn8xipnjapyf5hx6smzh04v4ncskxl747xxn6pgpq813z";
34+ };
35+
36+ inherit libsigsegv gettext coreutils;
37+
38+ ffcallAvailable = stdenv.isLinux && (libffcall != null);
39+
40+ buildInputs = [libsigsegv]
41+ ++ stdenv.lib.optional (gettext != null) gettext
42+ ++ stdenv.lib.optional (ncurses != null) ncurses
43+ ++ stdenv.lib.optional (pcre != null) pcre
44+ ++ stdenv.lib.optional (zlib != null) zlib
45+ ++ stdenv.lib.optional (readline != null) readline
46+ ++ stdenv.lib.optional (ffcallAvailable && (libffi != null)) libffi
47+ ++ stdenv.lib.optional ffcallAvailable libffcall
48+ ++ stdenv.lib.optionals x11Support [
49+ libX11 libXau libXt libXpm xproto libXext xextproto
50+ ];
51+
52+ # First, replace port 9090 (rather low, can be used)
53+ # with 64237 (much higher, IANA private area, not
54+ # anything rememberable).
55+ # Also remove reference to a type that disappeared from recent glibc
56+ # (seems the correct thing to do, found no reference to any solution)
57+ postPatch = ''
58+ sed -e 's@9090@64237@g' -i tests/socket.tst
59+ sed -i 's@/bin/pwd@${coreutils}&@' src/clisp-link.in
60+ find . -type f | xargs sed -e 's/-lICE/-lXau &/' -i
61+
62+ substituteInPlace modules/bindings/glibc/linux.lisp --replace "(def-c-type __swblk_t)" ""
63+ '';
64+
65+ configureFlags = "builddir"
66+ + stdenv.lib.optionalString (!dllSupport) " --without-dynamic-modules"
67+ + stdenv.lib.optionalString (readline != null) " --with-readline"
68+ # --with-dynamic-ffi can only exist with --with-ffcall - foreign.d does not compile otherwise
69+ + stdenv.lib.optionalString (ffcallAvailable && (libffi != null)) " --with-dynamic-ffi"
70+ + stdenv.lib.optionalString ffcallAvailable " --with-ffcall"
71+ + stdenv.lib.optionalString (!ffcallAvailable) " --without-ffcall"
72+ + stdenv.lib.concatMapStrings (x: " --with-module=" + x) withModules
73+ + stdenv.lib.optionalString threadSupport " --with-threads=POSIX_THREADS";
74+
75+ preBuild = ''
76+ sed -e '/avcall.h/a\#include "config.h"' -i src/foreign.d
77+ cd builddir
78+ '';
79+
80+ postInstall =
81+ stdenv.lib.optionalString (withModules != [])
82+ (''./clisp-link add "$out"/lib/clisp*/base "$(dirname "$out"/lib/clisp*/base)"/full''
83+ + stdenv.lib.concatMapStrings (x: " " + x) withModules);
84+
85+ NIX_CFLAGS_COMPILE = "-O0 ${stdenv.lib.optionalString (!stdenv.is64bit) "-falign-functions=4"}";
86+
87+ # TODO : make mod-check fails
88+ doCheck = false;
89+
90+ meta = {
91+ description = "ANSI Common Lisp Implementation";
92+ homepage = http://clisp.cons.org;
93+ maintainers = with stdenv.lib.maintainers; [raskin tohl];
94+ # problems on Darwin: https://github.com/NixOS/nixpkgs/issues/20062
95+ platforms = stdenv.lib.platforms.linux;
96+ };
97+}
pkgs/top-level/all-packages.nix+1
@@ -5437,6 +5437,7 @@ in
54375437 ceptre = callPackage ../development/interpreters/ceptre { };
54385438
54395439 clisp = callPackage ../development/interpreters/clisp { };
5440+ clisp-tip = callPackage ../development/interpreters/clisp/hg.nix { };
54405441
54415442 # compatibility issues in 2.47 - at list 2.44.1 is known good
54425443 # for sbcl bootstrap.