checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
These are all read from the environment by the default bmake
stdlib (e.g. <bsd.prog.mk>, <bsd.own.mk>). Some of the default
values (like building cat pages instead of man pages, or stripping
binaries when installing) don't really make sense for Nixpkgs, so we
override them here for every build using bmake.
Eventually I'd like to unify the bmake setupHook and the NetBSD make
setupHook, but not today.
As far as I can tell, libSystem on darwin provides a libm compatibility
symlink, but not a libcrypt one.
Prior art (eg. CPython) appears to use `stdenv.isDarwin` as a proxy for
`stdenv.hostPlatform.libc == "libSystem"`, but the latter also works in
cases where we're building on Darwin, but with eg. musl for some reason.
The Nix style guide isn't exactly comprehensive, but this at least seems
slightly closer to the examples:
https://nixos.org/manual/nixpkgs/stable/#sec-syntax
I'm annoyed that nixpkgs-fmt as of writing won't accept:
COPTS = [
# ...
] ++ optional (...) "..."
++ optional (...) "...";
...which seems to be the actual convention, looking at eg. pkgs.nginx.
-D_DEFAULT_SOURCE *and* -D_GNU_SOURCE together resolve all warnings
about implicitly defined functions.
-D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64 enable gcc's Large File
Extensions to allow a 32-bit host to serve files larger than 2GB.
Based on what Makefile.boot does, for platforms without bmake:
http://cvsweb.netbsd.org/bsdweb.cgi/src/libexec/httpd/Makefile.boot