2017-11-15 17:09:18 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }:
|
2015-03-27 05:24:35 +00:00
|
|
|
|
2017-11-15 17:09:18 +00:00
|
|
|
with stdenv.lib; stdenv.mkDerivation rec {
|
|
|
|
name = "mkcl-${version}";
|
|
|
|
version = "1.1.10.2017-11-14";
|
2015-03-27 05:24:35 +00:00
|
|
|
|
2017-11-15 17:09:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jcbeaudoin";
|
|
|
|
repo = "mkcl";
|
|
|
|
rev = "d3f5afe945907153db2be5a17a419966f83d7653";
|
|
|
|
sha256 = "1jfmnh96b5dy1874a9y843vihd14ya4by46rb4h5izldp6x3j3kl";
|
2015-03-27 05:24:35 +00:00
|
|
|
};
|
|
|
|
|
2017-11-15 17:09:18 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2015-03-27 05:24:35 +00:00
|
|
|
propagatedBuildInputs = [ gmp ];
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 12:44:15 +00:00
|
|
|
|
2015-03-27 05:24:35 +00:00
|
|
|
configureFlags = [
|
2015-10-15 16:43:23 +01:00
|
|
|
"GMP_CFLAGS=-I${gmp.dev}/include"
|
|
|
|
"GMP_LDFLAGS=-L${gmp.out}/lib"
|
2015-03-27 05:24:35 +00:00
|
|
|
];
|
|
|
|
|
2017-11-15 17:09:18 +00: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 22:39:12 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
|
|
|
|
'';
|
|
|
|
|
2017-11-15 17:09:18 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-03-27 05:24:35 +00:00
|
|
|
meta = {
|
|
|
|
description = "ANSI Common Lisp Implementation";
|
|
|
|
homepage = https://common-lisp.net/project/mkcl/;
|
2017-11-15 17:09:18 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ tohl ];
|
2015-03-27 05:24:35 +00:00
|
|
|
};
|
|
|
|
}
|