at 18.03-beta 48 lines 1.3 kB view raw
1{ stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }: 2 3with stdenv.lib; stdenv.mkDerivation rec { 4 name = "mkcl-${version}"; 5 version = "1.1.10.2017-11-14"; 6 7 src = fetchFromGitHub { 8 owner = "jcbeaudoin"; 9 repo = "mkcl"; 10 rev = "d3f5afe945907153db2be5a17a419966f83d7653"; 11 sha256 = "1jfmnh96b5dy1874a9y843vihd14ya4by46rb4h5izldp6x3j3kl"; 12 }; 13 14 nativeBuildInputs = [ makeWrapper ]; 15 16 propagatedBuildInputs = [ gmp ]; 17 18 hardeningDisable = [ "format" ]; 19 20 configureFlags = [ 21 "GMP_CFLAGS=-I${gmp.dev}/include" 22 "GMP_LDFLAGS=-L${gmp.out}/lib" 23 ]; 24 25 # tinycc configure flags copied from the tinycc derivation. 26 postConfigure = ''( 27 cd contrib/tinycc 28 ./configure --cc=cc \ 29 --elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \ 30 --crtprefix=${getLib stdenv.cc.libc}/lib \ 31 --sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include \ 32 --libpaths=${getLib stdenv.cc.libc}/lib 33 )''; 34 35 postInstall = '' 36 wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin" 37 ''; 38 39 enableParallelBuilding = true; 40 41 meta = { 42 description = "ANSI Common Lisp Implementation"; 43 homepage = https://common-lisp.net/project/mkcl/; 44 license = licenses.lgpl2Plus; 45 platforms = platforms.linux; 46 maintainers = with maintainers; [ tohl ]; 47 }; 48}