nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix
Francois-Rene Rideau 9456522528 Refactor Gambit support
Refactor the build rule:
- Put files in $out/gambit instead of $out.
- Make the optimization setting easy to override.
- Make use of gccStdenv more explicit at this level.
- Support new-style runtime options for forcing UTF-8 I/O.
- Override the PACKAGE_VERSION and PACKAGE_STRING with git version.
- Note that the license is lgpl21, not lpgl2 (Note: also dual asl20).
- Try and fail to meaningfully add missing runtimeDeps.
- Build using NIX_BUILD_CORES.
2020-05-17 15:48:12 -04:00

34 lines
1.1 KiB
Nix

{ pkgs, lib }:
rec {
stable-params = {
defaultRuntimeOptions = "f8,-8,t8";
buildRuntimeOptions = "f8,-8,t8";
fix-stamp = git-version : "";
};
unstable-params = {
defaultRuntimeOptions = "iL,fL,-L,tL";
buildRuntimeOptions = "i8,f8,-8,t8";
fix-stamp = git-version : ''
substituteInPlace configure \
--replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
--replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
'';
};
export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";
gambit-bootstrap = import ./bootstrap.nix ( pkgs );
meta = {
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 ];
};
}