2021-08-05 21:33:18 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper, gmp, gcc }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "mkcl";
|
|
|
|
version = "1.1.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jcbeaudoin";
|
|
|
|
repo = "mkcl";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26";
|
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
patches = [
|
|
|
|
# "Array sys_siglist[] never was part of the public interface. Replace it with calls to psiginfo()."
|
|
|
|
(fetchpatch {
|
|
|
|
name = "sys_siglist.patch";
|
|
|
|
url = "https://github.com/jcbeaudoin/MKCL/commit/0777dd08254c88676f4f101117b10786b22111d6.patch";
|
|
|
|
sha256 = "1dnr1jzha77nrxs22mclrcqyqvxxn6q1sfn35qjs77fi3jcinjsc";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ gmp ];
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
configureFlags = [
|
2021-08-05 21:33:18 +00:00
|
|
|
"GMP_CFLAGS=-I${lib.getDev gmp}/include"
|
2020-04-24 23:36:52 +00:00
|
|
|
"GMP_LDFLAGS=-L${gmp.out}/lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
# tinycc configure flags copied from the tinycc derivation.
|
|
|
|
postConfigure = ''(
|
|
|
|
cd contrib/tinycc
|
|
|
|
./configure --cc=cc \
|
|
|
|
--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \
|
2021-08-05 21:33:18 +00:00
|
|
|
--crtprefix=${lib.getLib stdenv.cc.libc}/lib \
|
|
|
|
--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include \
|
|
|
|
--libpaths=${lib.getLib stdenv.cc.libc}/lib
|
2020-04-24 23:36:52 +00:00
|
|
|
)'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "ANSI Common Lisp Implementation";
|
|
|
|
homepage = "https://common-lisp.net/project/mkcl/";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ tohl ];
|
|
|
|
};
|
|
|
|
}
|