gambit-unstable: 2020-09-20 -> 2023-07-30

This commit is contained in:
Francois-Rene Rideau
2023-07-30 16:49:11 -04:00
parent d68f7974fa
commit 785b7d40eb
3 changed files with 25 additions and 19 deletions
+11 -7
View File
@@ -1,5 +1,5 @@
{ gccStdenv, lib, git, openssl, autoconf, pkgs, makeStaticLibraries, gcc, coreutils, gnused, gnugrep,
src, version, git-version,
src, version, git-version, stampYmd ? 0, stampHms ? 0,
gambit-support, optimizationSetting ? "-O1", gambit-params ? pkgs.gambit-support.stable-params }:
# Note that according to a benchmark run by Marc Feeley on May 2018,
@@ -26,6 +26,7 @@ gccStdenv.mkDerivation rec {
bootstrap = gambit-support.gambit-bootstrap;
nativeBuildInputs = [ git autoconf ];
# TODO: if/when we can get all the library packages we depend on to have static versions,
# we could use something like (makeStaticLibraries openssl) to enable creation
# of statically linked binaries by gsc.
@@ -61,9 +62,9 @@ gccStdenv.mkDerivation rec {
# "--enable-coverage"
# "--enable-inline-jumps"
# "--enable-char-size=1" # default is 4
] ++
# due not enable poll on darwin due to https://github.com/gambit/gambit/issues/498
lib.optional (!gccStdenv.isDarwin) "--enable-poll";
] ++ gambit-params.extraOptions
# Do not enable poll on darwin due to https://github.com/gambit/gambit/issues/498
++ lib.optional (!gccStdenv.isDarwin) "--enable-poll";
configurePhase = ''
export CC=${gccStdenv.cc}/bin/${gccStdenv.cc.targetPrefix}gcc \
@@ -74,19 +75,22 @@ gccStdenv.mkDerivation rec {
XMKMF=${coreutils}/bin/false
unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
${gambit-params.fix-stamp git-version}
${gambit-params.fixStamp git-version stampYmd stampHms}
./configure --prefix=$out/gambit ${builtins.concatStringsSep " " configureFlags}
# OS-specific paths are hardcoded in ./configure
substituteInPlace config.status \
--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}" \
--replace "/usr/local/opt/openssl" "${lib.getLib openssl}"
${lib.optionalString (gccStdenv.isDarwin && !gambit-params.stable)
''--replace "/usr/local/opt/openssl@1.1" "${lib.getLib openssl}"''} \
--replace "/usr/local/opt/openssl" "${lib.getLib openssl}"
./config.status
'';
buildPhase = ''
# The MAKEFLAGS setting is a workaround for https://github.com/gambit/gambit/issues/833
export MAKEFLAGS="--output-sync=recurse"
echo "Make bootstrap compiler, from release bootstrap"
mkdir -p boot
cp -rp ${bootstrap}/gambit/. boot/.
@@ -13,7 +13,7 @@ rec {
--replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
--replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
substituteInPlace include/makefile.in \
--replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
--replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
'';
modules = true;
extraOptions = [];
@@ -28,13 +28,13 @@ rec {
gambit-bootstrap = import ./bootstrap.nix ( pkgs );
meta = {
meta = with lib; {
description = "Optimizing Scheme to C compiler";
homepage = "http://gambitscheme.org";
license = lib.licenses.lgpl21; # dual, also asl20
# NB regarding platforms: continuously tested on Linux,
# tested on macOS once in a while, *should* work everywhere.
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ thoughtpolice raskin fare ];
license = licenses.lgpl21Only; # dual, also asl20
# NB regarding platforms: continuously tested on Linux x86_64 and regularly tested on macOS x86_64.
# *should* work everywhere.
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice raskin fare ];
};
}
@@ -1,13 +1,15 @@
{ callPackage, fetchFromGitHub, gambit-support }:
callPackage ./build.nix {
version = "unstable-2020-09-20";
git-version = "4.9.3-1234-g6acd87df";
version = "unstable-2023-07-30";
git-version = "4.9.5-3-ge059fffd";
stampYmd = 20230730;
stampHms = 151945;
src = fetchFromGitHub {
owner = "feeley";
owner = "gambit";
repo = "gambit";
rev = "6acd87dfa95bfca33082a431e72f023345dc07ee";
sha256 = "0a3dy4ij8hzlp3sjam4b6dp6yvyz5d7g2x784qm3gp89fi2ck56r";
rev = "e059fffdfbd91e27c350ff2ebd671adefadd5212";
sha256 = "0q7hdfchl6lw53xawmmjvhyjdmqxjdsnzjqv9vpkl2qa4vyir5fs";
};
gambit-params = gambit-support.unstable-params;
}