* Extend libc
Include non-libc core libraries in the libc package. Many of these
mirror libraries present in glibc on linux, such as libgcc, libraries
used for iconv, and libraries used for reading kernel info (libkvm,
libprocstat, libmemstat).
Without this many packages outside the freebsd tree would need to be
modified to include standard dependencies which would already be on
the system for other packages.
* Mark FreeBSD as using LLVM
* Update default LLVM version FreeBSD
* Use patch monolith
The patchesRoot system combined with the fact that each derivation
will Request specific names of patches makes it very annoying to use
other FreeBSD source trees with nixpkgs. This new system allows
providing one Or more entire trees of patches whose contents will be
dynamically Parsed and only the relevant patches will be applied for
any one Derivation.
With this commit, the following knobs are available for specifying the
FreeBSD source:
- overriding `freebsd.versionInfo`, for picking another official
supported FreeBSD release.
- overriding `freebsd.source` for specifying a specific unpatched
FreeBSD source tree.
- overriding `freebsd.patches`, for specifying the patches to apply.
Co-Authored-by: Audrey Dutcher <audrey@rhelmot.io>
Co-Authored-by: John Ericson <John.Ericson@Obsidian.Systems>
See https://github.com/NixOS/nixpkgs/pull/82131 for the rest of the
changes for FreeBSD. This is PRed separately because it is a macOS
moderate rebuild so we target staging.
The main change is that we CD to the path we're building *after*
applying patches, so we can patch other parts of the tree (from
`extraPaths`) as needed.
Another change is that `netbsd.install` no longer depends on `fts`,
which it evidently no longer needs.
Not to netbsd, where it isn't needed, but elsewhere.
A few things going on here:
- Make compat use the "regular" not "host" makefile infra. This,
however, makes more assumptions that the toolchain is BSD-like, and
so we need to compensate for them with the likes of:
- `LORDER=...` and `TSORT=...`
- Move `export INSTALL_*` to install's setup hook so they don't interfere
with coreutils install
- Don't use `DESTDIR` for installing include files, instead set `INCSDIR`.
This is more proper, but doesn't work when `INCSDIR` is set multiple
times, unfortunately, as CLI defs override all other assignments. So
instead set `INCSDIR0` on the CLI, and do some `INCSDIR =
${INCSDIR0}/...` in the relevant packages.
- `INCSDIR` is set just in the NetBSD setup hook because FreeBSD uses
`INCLUDEDIR`.
I plan on doing the sources for FreeBSD differently. Indeed we might
want to change this for NetBSD too eventually.
In any event, the way we manage sources is not intrinsically the same
across BSDs so it makes sense to pull this out.