mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
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).
This commit is contained in:
parent
a765577004
commit
e78b820beb
2 changed files with 101 additions and 16 deletions
41
pkgs/development/compilers/gambit/bootstrap.nix
Normal file
41
pkgs/development/compilers/gambit/bootstrap.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, fetchurl, autoconf, ... }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gambit-bootstrap-${version}";
|
||||
version = "4.8.8";
|
||||
tarball_version = "v4_8_8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-${tarball_version}-devel.tgz";
|
||||
sha256 = "075k2z04d6svxqf9paj3xvp0mm0xzy0vbma1y61s0lkywdim8xjz";
|
||||
};
|
||||
|
||||
buildInputs = [ autoconf ];
|
||||
|
||||
configurePhase = ''
|
||||
./configure --prefix=$out --enable-single-host
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
# Copy the (configured) sources now, not later, so we don't have to filter out
|
||||
# all the intermediate build products.
|
||||
mkdir -p $out ; cp -rp . $out/
|
||||
|
||||
# build the gsc-boot* compiler
|
||||
make bootstrap
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -fa ./ $out/
|
||||
'';
|
||||
|
||||
forceShare = [ "info" ];
|
||||
|
||||
meta = {
|
||||
description = "Optimizing Scheme to C compiler, bootstrap step";
|
||||
homepage = "http://gambitscheme.org";
|
||||
license = stdenv.lib.licenses.lgpl2;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
|
||||
};
|
||||
}
|
|
@ -1,31 +1,75 @@
|
|||
{ stdenv, fetchurl, openssl }:
|
||||
{ stdenv, fetchurl, fetchgit, git, openssl, autoconf, pkgs }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gambit-${version}";
|
||||
version = "4.8.6";
|
||||
devver = "4_8_6";
|
||||
version = "4.8.8-f3ffeb6";
|
||||
bootstrap = import ./bootstrap.nix ( pkgs );
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${devver}-devel.tgz";
|
||||
sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
|
||||
# devver = "4_8_8";
|
||||
# src = fetchurl {
|
||||
# url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.8/source/gambit-v${version}-devel.tgz";
|
||||
# sha256 = "0j3ka76cfb007rlcc3nv5p1s6vh31cwp87hwwabawf16vs1jb7bl";
|
||||
# };
|
||||
src = fetchgit {
|
||||
url = "https://github.com/feeley/gambit.git";
|
||||
rev = "f3ffeb695aeea80c18c1b9ef276b57898c780dca";
|
||||
sha256 = "1lqixsrgk9z2gj6z1nkys0pfd3m5zjxrp3gvqn2wpr9h7hjb8x06";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--enable-single-host"
|
||||
"--enable-shared"
|
||||
"--enable-absolute-shared-libs"
|
||||
"--enable-c-opt=-O6" "--enable-gcc-opts" "--enable-inline-jumps"
|
||||
"--enable-thread-system=posix" "--enable-dynamic-tls"
|
||||
"--enable-openssl"
|
||||
];
|
||||
buildInputs = [ openssl git autoconf bootstrap ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
configurePhase = ''
|
||||
options=(
|
||||
--prefix=$out
|
||||
--enable-single-host
|
||||
--enable-c-opt=-O2
|
||||
--enable-gcc-opts
|
||||
--enable-shared
|
||||
--enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it.
|
||||
--enable-poll
|
||||
--enable-openssl
|
||||
|
||||
#--enable-multiple-versions # Nope, NixOS already does version multiplexing
|
||||
#--enable-guide
|
||||
#--enable-track-scheme
|
||||
#--enable-high-res-timing
|
||||
#--enable-max-processors=4
|
||||
#--enable-multiple-vms
|
||||
#--enable-dynamic-tls
|
||||
#--enable-multiple-vms
|
||||
#--enable-multiple-threaded-vms ## when SMP branch is merged in
|
||||
#--enable-thread-system=posix ## default when --enable-multiple-vms is on.
|
||||
#--enable-profile
|
||||
#--enable-coverage
|
||||
#--enable-inline-jumps
|
||||
#--enable-char-size=1" ; default is 4
|
||||
)
|
||||
./configure ''${options[@]}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
# Make bootstrap compiler, from release bootstrap
|
||||
mkdir -p boot/wip-compiler &&
|
||||
cp -rp ${bootstrap}/. boot/wip-compiler/. &&
|
||||
chmod -R u+w boot &&
|
||||
cd boot/wip-compiler && \
|
||||
cp ../../gsc/makefile.in ../../gsc/*.scm gsc && \
|
||||
(cd gsc && make bootclean ) &&
|
||||
make bootstrap &&
|
||||
cd ../.. &&
|
||||
cp boot/wip-compiler/gsc/gsc gsc-boot &&
|
||||
|
||||
# Now use the bootstrap compiler to build the real thing!
|
||||
make -j2 from-scratch
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Optimizing Scheme to C compiler";
|
||||
homepage = "http://gambitscheme.org";
|
||||
license = stdenv.lib.licenses.lgpl2;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue