2017-11-15 18:09:18 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }:
|
2015-03-27 06:24:35 +01:00
|
|
|
|
2017-11-15 18:09:18 +01:00
|
|
|
with stdenv.lib; stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "mkcl";
|
2019-05-17 23:10:49 +02:00
|
|
|
version = "1.1.11";
|
2015-03-27 06:24:35 +01:00
|
|
|
|
2017-11-15 18:09:18 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jcbeaudoin";
|
|
|
|
repo = "mkcl";
|
2019-05-17 23:10:49 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26";
|
2015-03-27 06:24:35 +01:00
|
|
|
};
|
|
|
|
|
2017-11-15 18:09:18 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2015-03-27 06:24:35 +01:00
|
|
|
propagatedBuildInputs = [ gmp ];
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 13:44:15 +01:00
|
|
|
|
2015-03-27 06:24:35 +01:00
|
|
|
configureFlags = [
|
2015-10-15 17:43:23 +02:00
|
|
|
"GMP_CFLAGS=-I${gmp.dev}/include"
|
|
|
|
"GMP_LDFLAGS=-L${gmp.out}/lib"
|
2015-03-27 06:24:35 +01:00
|
|
|
];
|
|
|
|
|
2017-11-15 18:09:18 +01:00
|
|
|
# tinycc configure flags copied from the tinycc derivation.
|
|
|
|
postConfigure = ''(
|
|
|
|
cd contrib/tinycc
|
|
|
|
./configure --cc=cc \
|
|
|
|
--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
--crtprefix=${getLib stdenv.cc.libc}/lib \
|
|
|
|
--sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include \
|
|
|
|
--libpaths=${getLib stdenv.cc.libc}/lib
|
|
|
|
)'';
|
|
|
|
|
2015-10-14 23:39:12 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
|
|
|
|
'';
|
|
|
|
|
2017-11-15 18:09:18 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-03-27 06:24:35 +01:00
|
|
|
meta = {
|
|
|
|
description = "ANSI Common Lisp Implementation";
|
|
|
|
homepage = https://common-lisp.net/project/mkcl/;
|
2017-11-15 18:09:18 +01:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ tohl ];
|
2015-03-27 06:24:35 +01:00
|
|
|
};
|
|
|
|
}
|