6 defaultRuntimeOptions = "iL,fL,-L,tL";
7 buildRuntimeOptions = "i8,f8,-8,t8";
8 targets = "js"; # arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64
9 #fixStamp = _: _: _: "";
10 fixStamp = git-version: stampYmd: stampHms: ''
11 echo "Fixing timestamp recipe in Makefile"
12 substituteInPlace configure \
13 --replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
14 --replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
15 substituteInPlace include/makefile.in \
16 --replace "\$\$(\$(GIT) describe --tag --always | sed 's/-bootstrap\$\$//')" "v${git-version}" \
17 --replace "echo > stamp.h;" "(echo '#define ___STAMP_VERSION \"v${git-version}\"'; echo '#define ___STAMP_YMD ${toString stampYmd}'; echo '#define ___STAMP_HMS ${toString stampHms}';) > stamp.h;";
18 grep -i ' version=\|echo..#define ___STAMP_VERSION' include/makefile.in # XXX DEBUG -- REMOVE ME
21 extraOptions = [ "CFLAGS=-foptimize-sibling-calls" ];
24 unstable-params = stable-params // {
26 extraOptions = [ ]; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable
29 export-gambopt = params: "export GAMBOPT=${params.buildRuntimeOptions} ;";
31 gambit-bootstrap = import ./bootstrap.nix (pkgs);
34 description = "Optimizing Scheme to C compiler";
35 homepage = "http://gambitscheme.org";
36 license = licenses.lgpl21Only; # dual, also asl20
37 # NB regarding platforms: continuously tested on Linux x86_64 and regularly tested on macOS x86_64.
38 # *should* work everywhere.
39 platforms = platforms.unix;
40 maintainers = with maintainers; [