1 # This derivation is a reduced-functionality variant of Gambit stable,
2 # used to compile the full version of Gambit stable *and* unstable.
4 { gccStdenv, lib, fetchurl, autoconf, gcc, coreutils, gambit-support, ... }:
5 # As explained in build.nix, GCC compiles Gambit 10x faster than Clang, for code 3x better
7 gccStdenv.mkDerivation {
8 pname = "gambit-bootstrap";
12 url = "https://gambitscheme.org/4.9.5/gambit-v4_9_5.tgz";
13 sha256 = "sha256-4o74218OexFZcgwVAFPcq498TK4fDlyDiUR5cHP4wdw=";
16 buildInputs = [ autoconf ];
19 export CC=${gcc}/bin/gcc CXX=${gcc}/bin/g++ \
20 CPP=${gcc}/bin/cpp CXXCPP=${gcc}/bin/cpp LD=${gcc}/bin/ld \
21 XMKMF=${coreutils}/bin/false
22 unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
23 ./configure --prefix=$out/gambit
27 # Copy the (configured) sources now, not later, so we don't have to filter out
28 # all the intermediate build products.
29 mkdir -p $out/gambit ; cp -rp . $out/gambit/
31 # build the gsc-boot* compiler
32 make -j$NIX_BUILD_CORES bootstrap
36 cp -fa ./gsc-boot $out/gambit/
39 forceShare = [ "info" ];
41 meta = gambit-support.meta // {
42 description = "Optimizing Scheme to C compiler, bootstrap step";