nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, gmp, gcc }:
2
3stdenv.mkDerivation rec {
4 pname = "mkcl";
5 version = "1.1.11";
6
7 src = fetchFromGitHub {
8 owner = "jcbeaudoin";
9 repo = "mkcl";
10 rev = "v${version}";
11 sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26";
12 };
13
14 patches = [
15 # "Array sys_siglist[] never was part of the public interface. Replace it with calls to psiginfo()."
16 (fetchpatch {
17 name = "sys_siglist.patch";
18 url = "https://github.com/jcbeaudoin/MKCL/commit/0777dd08254c88676f4f101117b10786b22111d6.patch";
19 sha256 = "1dnr1jzha77nrxs22mclrcqyqvxxn6q1sfn35qjs77fi3jcinjsc";
20 })
21 ];
22
23 nativeBuildInputs = [ makeWrapper ];
24
25 propagatedBuildInputs = [ gmp ];
26
27 hardeningDisable = [ "format" ];
28
29 configureFlags = [
30 "GMP_CFLAGS=-I${lib.getDev gmp}/include"
31 "GMP_LDFLAGS=-L${gmp.out}/lib"
32 ];
33
34 # tinycc configure flags copied from the tinycc derivation.
35 postConfigure = ''(
36 cd contrib/tinycc
37 ./configure --cc=cc \
38 --elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \
39 --crtprefix=${lib.getLib stdenv.cc.libc}/lib \
40 --sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include \
41 --libpaths=${lib.getLib stdenv.cc.libc}/lib
42 )'';
43
44 postInstall = ''
45 wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
46 '';
47
48 enableParallelBuilding = true;
49
50 meta = with lib; {
51 broken = (stdenv.isLinux && stdenv.isAarch64);
52 description = "ANSI Common Lisp Implementation";
53 homepage = "https://common-lisp.net/project/mkcl/";
54 license = licenses.lgpl2Plus;
55 platforms = platforms.linux;
56 maintainers = with maintainers; [ tohl ];
57 };
58}