Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 88 lines 2.5 kB view raw
1{ 2 fetchurl, 3 lib, 4 stdenv, 5 autoconf, 6 automake, 7 libtool, 8 gmp, 9 libunistring, 10}: 11 12stdenv.mkDerivation rec { 13 pname = "bigloo"; 14 version = "4.6a"; 15 16 src = fetchurl { 17 url = "https://www-sop.inria.fr/mimosa/fp/Bigloo/download/bigloo-${version}.tar.gz"; 18 hash = "sha256-lwXsPeAMwcUe52mYlIQaN3DAaodCFbRWNbiESuba8KY="; 19 }; 20 21 nativeBuildInputs = [ 22 autoconf 23 automake 24 libtool 25 ]; 26 27 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ 28 libunistring 29 ]; 30 31 propagatedBuildInputs = [ gmp ]; 32 33 preConfigure = 34 # For libuv on darwin 35 lib.optionalString stdenv.hostPlatform.isDarwin '' 36 export LIBTOOLIZE=libtoolize 37 '' 38 + '' 39 # Help libgc's configure. 40 export CXXCPP="$CXX -E" 41 ''; 42 43 patchPhase = '' 44 # Fix absolute paths. 45 sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g' \ 46 -e 's=/tmp=$TMPDIR=g' -i autoconf/* \ 47 [Mm]akefile* */[Mm]akefile* */*/[Mm]akefile* \ 48 */*/*/[Mm]akefile* */*/*/*/[Mm]akefile* \ 49 comptime/Cc/cc.scm gc/install-* 50 51 # Make sure we don't change string lengths in the generated 52 # C files. 53 sed -e 's=/bin/rm= rm=g' -e 's=/bin/mv= mv=g' \ 54 -i comptime/Cc/cc.c 55 ''; 56 57 checkTarget = "test"; 58 59 # remove forbidden references to $TMPDIR 60 preFixup = lib.optionalString stdenv.hostPlatform.isLinux '' 61 for f in "$out"/bin/*; do 62 if isELF "$f"; then 63 patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f" 64 fi 65 done 66 ''; 67 68 meta = { 69 description = "Efficient Scheme compiler"; 70 homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/"; 71 license = lib.licenses.gpl2Plus; 72 platforms = lib.platforms.unix; 73 maintainers = with lib.maintainers; [ thoughtpolice ]; 74 broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # segfault during build 75 76 longDescription = '' 77 Bigloo is a Scheme implementation devoted to one goal: enabling 78 Scheme based programming style where C(++) is usually 79 required. Bigloo attempts to make Scheme practical by offering 80 features usually presented by traditional programming languages 81 but not offered by Scheme and functional programming. Bigloo 82 compiles Scheme modules. It delivers small and fast stand alone 83 binary executables. Bigloo enables full connections between 84 Scheme and C programs, between Scheme and Java programs, and 85 between Scheme and C# programs. 86 ''; 87 }; 88}