In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
The set of names to inherit was generated by running this in a loop until it did not error:
```
nix-instantiate --parse pkgs/development/compilers/gerbil/gerbil-support.nix
```
The soname/identification of libgerbil on darwin is not correctly fixed up,
resulting in any binaries linked with libgerbil to attempt to link to
libgerbil in the temporary build dir from the gerbil derivation. This
means that any compiled gerbil program won't work as the propagated soname
will result in the binary being unable to correctly link with libgerbil.
Adding an Darwin-only step to use `install_name_tool` to fix up the soname
of libgerbil fixes this issue. We're using realpath here as the qualified
path to `libgerbil` is `$out/gerbil/$version/lib/libgerbil.so` and this is
an easier way to obtain the qualified path.
FixesNixOS/nixpkgs#272967.
Add an indirection between gerbil package parameters and nix packages
computed from those parameters, so overlays can easily override the former.
Run unit-tests of gerbil packages (not integration tests).
Fix binaries for gerbil packages.
Fix support for gerbil packages including binaries.
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
- Use the new Gambit support.
- Move files from $out to $out/gerbil.
- Use new Gerbil configuration and installation scripts.
- Move some fixups from preBuild to postPatch.
- Give up on previous failed attempts at using static libraries.
- Add support for compiling libraries written in Gerbil.
- Build using NIX_BUILD_CORES.
- Register all those things in all-packages.
Let Gerbil Scheme find its GERBIL_HOME where Nix put it
when the environment variable is left unspecified.
Comment out work in progress for static linking.
Notes about working on macOS.