21 stdenv.mkDerivation rec {
26 url = "https://common-lisp.net/project/ecl/static/files/release/ecl-${version}.tgz";
27 hash = "sha256-5Opluxhh4OSVOGv6i8ZzvQFOltPPnZHpA4+RQ1y+Yis=";
37 propagatedBuildInputs =
43 # replaces ecl's own gc which other packages can depend on, thus propagated
45 ++ lib.optionals useBoehmgc [
46 # replaces ecl's own gc which other packages can depend on, thus propagated
51 # https://gitlab.com/embeddable-common-lisp/ecl/-/merge_requests/1
53 url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/ecl/patches/write_error.patch";
54 sha256 = "0hfxacpgn4919hg0mn4wf4m8r7y592r4gw7aqfnva7sckxi6w089";
60 (if threadSupport then "--enable-threads" else "--disable-threads")
61 "--with-gmp-incdir=${lib.getDev gmp}/include"
62 "--with-gmp-libdir=${lib.getLib gmp}/lib"
63 "--with-libffi-incdir=${lib.getDev libffi}/include"
64 "--with-libffi-libdir=${lib.getLib libffi}/lib"
66 ++ lib.optionals useBoehmgc [
67 "--with-libgc-incdir=${lib.getDev boehmgc}/include"
68 "--with-libgc-libdir=${lib.getLib boehmgc}/lib"
70 ++ lib.optional (!noUnicode) "--enable-unicode";
72 hardeningDisable = [ "format" ];
74 # ECL’s ‘make check’ only works after install, making it a de-facto
76 doInstallCheck = true;
77 installCheckTarget = "check";
80 sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
81 wrapProgram "$out/bin/ecl" --prefix PATH ':' "${
83 gcc # for the C compiler
84 gcc.bintools.bintools # for ar
90 description = "Lisp implementation aiming to be small, fast and easy to embed";
91 homepage = "https://common-lisp.net/project/ecl/";
92 license = licenses.mit;
94 maintainers = lib.teams.lisp.members;
95 platforms = platforms.unix;
96 changelog = "https://gitlab.com/embeddable-common-lisp/ecl/-/raw/${version}/CHANGELOG";