Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 70 lines 2.2 kB view raw
1{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp 2, darwin, libunistring 3}: 4 5stdenv.mkDerivation rec { 6 pname = "bigloo"; 7 version = "4.4b"; 8 9 src = fetchurl { 10 url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo-${version}.tar.gz"; 11 sha256 = "sha256-oxOSJwKWmwo7PYAwmeoFrKaYdYvmvQquWXyutolc488="; 12 }; 13 14 nativeBuildInputs = [ autoconf automake libtool ]; 15 16 buildInputs = lib.optionals stdenv.isDarwin [ 17 darwin.apple_sdk.frameworks.ApplicationServices 18 libunistring 19 ]; 20 21 propagatedBuildInputs = [ gmp ]; 22 23 preConfigure = 24 # For libuv on darwin 25 lib.optionalString stdenv.isDarwin '' 26 export LIBTOOLIZE=libtoolize 27 '' + 28 # Help libgc's configure. 29 '' export CXXCPP="$CXX -E" 30 ''; 31 32 patchPhase = '' 33 # Fix absolute paths. 34 sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g' \ 35 -e 's=/tmp=$TMPDIR=g' -i autoconf/* \ 36 [Mm]akefile* */[Mm]akefile* */*/[Mm]akefile* \ 37 */*/*/[Mm]akefile* */*/*/*/[Mm]akefile* \ 38 comptime/Cc/cc.scm gc/install-* 39 40 # Make sure we don't change string lengths in the generated 41 # C files. 42 sed -e 's=/bin/rm= rm=g' -e 's=/bin/mv= mv=g' \ 43 -i comptime/Cc/cc.c 44 ''; 45 46 checkTarget = "test"; 47 48 # Hack to avoid TMPDIR in RPATHs. 49 preFixup = ''rm -rf "$(pwd)" ''; 50 51 meta = { 52 description = "Efficient Scheme compiler"; 53 homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/"; 54 license = lib.licenses.gpl2Plus; 55 platforms = lib.platforms.unix; 56 maintainers = with lib.maintainers; [ thoughtpolice ]; 57 58 longDescription = '' 59 Bigloo is a Scheme implementation devoted to one goal: enabling 60 Scheme based programming style where C(++) is usually 61 required. Bigloo attempts to make Scheme practical by offering 62 features usually presented by traditional programming languages 63 but not offered by Scheme and functional programming. Bigloo 64 compiles Scheme modules. It delivers small and fast stand alone 65 binary executables. Bigloo enables full connections between 66 Scheme and C programs, between Scheme and Java programs, and 67 between Scheme and C# programs. 68 ''; 69 }; 70}