15 , threadSupport ? true
20 stdenv.mkDerivation rec {
25 url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
26 sha256 = "sha256-sVp13PhLj2LmhyDMqxOT+WEcB4/NOv3WOaEIbK0BCQA=";
36 propagatedBuildInputs = [
41 # replaces ecl's own gc which other packages can depend on, thus propagated
42 ] ++ lib.optionals useBoehmgc [
43 # replaces ecl's own gc which other packages can depend on, thus propagated
48 # https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1
50 url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ecl/patches/write_error.patch";
51 sha256 = "0hfxacpgn4919hg0mn4wf4m8r7y592r4gw7aqfnva7sckxi6w089";
56 (if threadSupport then "--enable-threads" else "--disable-threads")
57 "--with-gmp-incdir=${lib.getDev gmp}/include"
58 "--with-gmp-libdir=${lib.getLib gmp}/lib"
59 "--with-libffi-incdir=${lib.getDev libffi}/include"
60 "--with-libffi-libdir=${lib.getLib libffi}/lib"
61 ] ++ lib.optionals useBoehmgc [
62 "--with-libgc-incdir=${lib.getDev boehmgc}/include"
63 "--with-libgc-libdir=${lib.getLib boehmgc}/lib"
64 ] ++ lib.optional (!noUnicode) "--enable-unicode";
66 hardeningDisable = [ "format" ];
69 sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
70 wrapProgram "$out/bin/ecl" --prefix PATH ':' "${
72 gcc # for the C compiler
73 gcc.bintools.bintools # for ar
79 description = "Lisp implementation aiming to be small, fast and easy to embed";
80 homepage = "https://common-lisp.net/project/ecl/";
81 license = licenses.mit;
82 maintainers = lib.teams.lisp.members;
83 platforms = platforms.unix;
84 changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${version}/CHANGELOG";