Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a76557700444
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f96e4edb1777
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jul 7, 2017

  1. 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).
    fare authored and Mic92 committed Jul 7, 2017

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    e78b820 View commit details
  2. gerbil: 0.11 -> 0.12-DEV

    fare authored and Mic92 committed Jul 7, 2017
    2
    Copy the full SHA
    f96e4ed View commit details
Showing with 120 additions and 22 deletions.
  1. +41 −0 pkgs/development/compilers/gambit/bootstrap.nix
  2. +60 −16 pkgs/development/compilers/gambit/default.nix
  3. +19 −6 pkgs/development/compilers/gerbil/default.nix
41 changes: 41 additions & 0 deletions pkgs/development/compilers/gambit/bootstrap.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
76 changes: 60 additions & 16 deletions pkgs/development/compilers/gambit/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
25 changes: 19 additions & 6 deletions pkgs/development/compilers/gerbil/default.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{ stdenv, fetchurl, fetchgit, gambit, openssl, zlib, coreutils, rsync, bash }:
{ stdenv, fetchurl, fetchgit, gambit,
coreutils, rsync, bash,
openssl, zlib, sqlite, libxml2, libyaml, libmysql, lmdb, leveldb }:

stdenv.mkDerivation rec {
name = "gerbil-${version}";

version = "0.11";
src = fetchurl {
url = "https://github.com/vyzo/gerbil/archive/v${version}.tar.gz";
sha256 = "0mqg6cqdcf5qr7vk79x5zkls7z2wm8i3lhwn0b7i0g1m6yyyyff7";
version = "0.12-DEV";
src = fetchgit {
url = "https://github.com/vyzo/gerbil.git";
rev = "3657b6e940ea248e0b312f276590e38ff68997e7";
sha256 = "11ys7082ghkm4yikz4qxmv3jpxcr42jfi0jhjw1mpzbqdg6004w2";
};

buildInputs = [ gambit openssl zlib coreutils rsync bash ];
buildInputs = [
gambit openssl
coreutils rsync bash
zlib openssl zlib sqlite libxml2 libyaml libmysql lmdb leveldb
];

postPatch = ''
patchShebangs .
@@ -21,7 +28,13 @@ stdenv.mkDerivation rec {

buildPhase = ''
runHook preBuild
# Enable all optional libraries
substituteInPlace "src/std/build-features.ss" --replace '#f' '#t'
# Build, replacing make by build.sh
( cd src && sh build.sh )
runHook postBuild
'';