git.iko.soy/typeable/nixpkgs
on master help sign in
gambit: 4.8.6 -> 4.8.8-f3ffeb6

Using a yet unreleased development version of gambit, so as to be able to build a recent gerbil. Update the way gambit is bootstrapped, which involves building a release version of gambit (which for a development gambit, is not the same version as the current version of gambit).

commite78b820bebd556e7fbc27c8e31e2eddff3f6164d authorFrancois-Rene Rideau <fare@tunes.org> dateWed 28 Jun 2017, 22:11 (9 years ago) parenta765577
2 files changed+101−16
pkgs/development/compilers/gambit/bootstrap.nix+41 pkgs/development/compilers/gambit/default.nix+60−16
pkgs/development/compilers/gambit/bootstrap.nixnew file+41
@@ -0,0 +1,41 @@
1+{ stdenv, fetchurl, autoconf, ... }:
2+
3+stdenv.mkDerivation rec {
4+ name = "gambit-bootstrap-${version}";
5+ version = "4.8.8";
6+ tarball_version = "v4_8_8";
7+
8+ src = fetchurl {
9+ url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-${tarball_version}-devel.tgz";
10+ sha256 = "075k2z04d6svxqf9paj3xvp0mm0xzy0vbma1y61s0lkywdim8xjz";
11+ };
12+
13+ buildInputs = [ autoconf ];
14+
15+ configurePhase = ''
16+ ./configure --prefix=$out --enable-single-host
17+ '';
18+
19+ buildPhase = ''
20+ # Copy the (configured) sources now, not later, so we don't have to filter out
21+ # all the intermediate build products.
22+ mkdir -p $out ; cp -rp . $out/
23+
24+ # build the gsc-boot* compiler
25+ make bootstrap
26+ '';
27+
28+ installPhase = ''
29+ cp -fa ./ $out/
30+ '';
31+
32+ forceShare = [ "info" ];
33+
34+ meta = {
35+ description = "Optimizing Scheme to C compiler, bootstrap step";
36+ homepage = "http://gambitscheme.org";
37+ license = stdenv.lib.licenses.lgpl2;
38+ platforms = stdenv.lib.platforms.linux;
39+ maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
40+ };
41+}
pkgs/development/compilers/gambit/default.nix+60−16
@@ -1,31 +1,75 @@
1−{ stdenv, fetchurl, openssl }:
1+{ stdenv, fetchurl, fetchgit, git, openssl, autoconf, pkgs }:
22
33stdenv.mkDerivation rec {
44 name = "gambit-${version}";
5− version = "4.8.6";
6− devver = "4_8_6";
5+ version = "4.8.8-f3ffeb6";
6+ bootstrap = import ./bootstrap.nix ( pkgs );
77
8− src = fetchurl {
9− url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${devver}-devel.tgz";
10− sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
8+# devver = "4_8_8";
9+# src = fetchurl {
10+# url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${version}-devel.tgz";
11+# sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
12+# };
13+ src = fetchgit {
14+ url = "https://github.com/feeley/gambit.git";
15+ rev = "f3ffeb695aeea80c18c1b9ef276b57898c780dca";
16+ sha256 = "1lqixsrgk9z2gj6z1nkys0pfd3m5zjxrp3gvqn2wpr9h7hjb8x06";
1117 };
1218
13− configureFlags = [
14− "--enable-single-host"
15− "--enable-shared"
16− "--enable-absolute-shared-libs"
17− "--enable-c-opt=-O6" "--enable-gcc-opts" "--enable-inline-jumps"
18− "--enable-thread-system=posix" "--enable-dynamic-tls"
19− "--enable-openssl"
20− ];
19+ buildInputs = [ openssl git autoconf bootstrap ];
2120
22− buildInputs = [ openssl ];
21+ configurePhase = ''
22+ options=(
23+ --prefix=$out
24+ --enable-single-host
25+ --enable-c-opt=-O2
26+ --enable-gcc-opts
27+ --enable-shared
28+ --enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it.
29+ --enable-poll
30+ --enable-openssl
31+
32+ #--enable-multiple-versions # Nope, NixOS already does version multiplexing
33+ #--enable-guide
34+ #--enable-track-scheme
35+ #--enable-high-res-timing
36+ #--enable-max-processors=4
37+ #--enable-multiple-vms
38+ #--enable-dynamic-tls
39+ #--enable-multiple-vms
40+ #--enable-multiple-threaded-vms ## when SMP branch is merged in
41+ #--enable-thread-system=posix ## default when --enable-multiple-vms is on.
42+ #--enable-profile
43+ #--enable-coverage
44+ #--enable-inline-jumps
45+ #--enable-char-size=1" ; default is 4
46+ )
47+ ./configure ''${options[@]}
48+ '';
49+
50+ buildPhase = ''
51+ # Make bootstrap compiler, from release bootstrap
52+ mkdir -p boot/wip-compiler &&
53+ cp -rp ${bootstrap}/. boot/wip-compiler/. &&
54+ chmod -R u+w boot &&
55+ cd boot/wip-compiler && \
56+ cp ../../gsc/makefile.in ../../gsc/*.scm gsc && \
57+ (cd gsc && make bootclean ) &&
58+ make bootstrap &&
59+ cd ../.. &&
60+ cp boot/wip-compiler/gsc/gsc gsc-boot &&
61+
62+ # Now use the bootstrap compiler to build the real thing!
63+ make -j2 from-scratch
64+ '';
65+
66+ doCheck = true;
2367
2468 meta = {
2569 description = "Optimizing Scheme to C compiler";
2670 homepage = "http://gambitscheme.org";
2771 license = stdenv.lib.licenses.lgpl2;
2872 platforms = stdenv.lib.platforms.linux;
29− maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
73+ maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
3074 };
3175}