mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-24 13:53:24 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
47 lines
1.8 KiB
Nix
47 lines
1.8 KiB
Nix
{ pkgs, lib }:
|
|
|
|
rec {
|
|
stable-params = {
|
|
stable = true;
|
|
defaultRuntimeOptions = "iL,fL,-L,tL";
|
|
buildRuntimeOptions = "i8,f8,-8,t8";
|
|
targets = "js"; # arm,java,js,php,python,riscv-32,riscv-64,ruby,x86,x86-64
|
|
#fixStamp = _: _: _: "";
|
|
fixStamp = git-version: stampYmd: stampHms: ''
|
|
echo "Fixing timestamp recipe in Makefile"
|
|
substituteInPlace configure \
|
|
--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 "\$\$(\$(GIT) describe --tag --always | sed 's/-bootstrap\$\$//')" "v${git-version}" \
|
|
--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;";
|
|
grep -i ' version=\|echo..#define ___STAMP_VERSION' include/makefile.in # XXX DEBUG -- REMOVE ME
|
|
'';
|
|
modules = true;
|
|
extraOptions = [ "CFLAGS=-foptimize-sibling-calls" ];
|
|
};
|
|
|
|
unstable-params = stable-params // {
|
|
stable = false;
|
|
extraOptions = [ ]; # "CFLAGS=-foptimize-sibling-calls" not necessary in latest unstable
|
|
};
|
|
|
|
export-gambopt = params: "export GAMBOPT=${params.buildRuntimeOptions} ;";
|
|
|
|
gambit-bootstrap = import ./bootstrap.nix (pkgs);
|
|
|
|
meta = with lib; {
|
|
description = "Optimizing Scheme to C compiler";
|
|
homepage = "http://gambitscheme.org";
|
|
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
|
|
];
|
|
};
|
|
}
|