-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: Rework scope + building libc #298849
Conversation
Part of #296581 |
Please explain the reasons for changes in commit messages, not just the PR body, in as much detail as you can. For core changes like this, it's really important to be able to look back and understand why things are the way they are, when there's a need to change them later.
I'm a bit confused by this, because this attribute already builds for me? |
The build just failed for me with
I definitely like the |
I might actually take a stab at this, to help things along. |
#299347 OK an here it is. This should be a much simpler diff on top :). |
1135d55
to
ceaaf8c
Compare
#299347 is now, merged, and I did a crude rebase on top |
d48664c
to
0798558
Compare
I was actually working on simplifying this last night and then I woke up and you were messing with this branch! I would like to keep 13 support, but I can simplify it to just the major version as a differentiator and not any minor versions. |
@rhelmot sorry for the belated response! Yeah if you have use for 13, then sure that plan sounds good. Just wanted to be clear that I don't care about 13 / don't think because Nixpkgs was doing 13 Nixpkgs is insisting on supporting 13. |
I hope resurrecting your work simplifying after my rebasing and things will not be too hard :) |
433a5b6
to
c445839
Compare
I came up with one last simplification in order to improve the portability of the nixpkgs code across FreeBSD versions. The rationale and usage are in the most recent commit message. |
@rhelmot do you want to undo my deleting the version 13 patches? Also see the formatter failure --- I made formatting required for all things BSD recently. |
Yes, I didn't realize that was easily revertable. Could you explain how to run the formatter? I looked on the nixpkgs-fmt repo but couldn't find anything. |
(messaged in |
c445839
to
f7d1442
Compare
There are no more changes I want to make before merge. Review time! |
7a38218
to
6ecc99b
Compare
* 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 <[email protected]> Co-Authored-by: John Ericson <[email protected]>
The old patches are kept because the version is actually configurable. In the future both versions may be exposed. Co-Auhtored-By: Artemis Tosini <[email protected]> Co-Authored-by: John Ericson <[email protected]>
6ecc99b
to
2cc214b
Compare
Looks great!! I just read redid the history but kept the final contents. So merging. (6ecc99b14640c75d1cff45e6a54dca4d7d040905: == 2cc214b:) |
Description of changes
This PR depends on #298717, however it is a little big so I would like to get started on reviews now.
This reworks the building of packages based on the FreeBSD source tree in order to support choosing a source branch. It adds the bare minimum number of packages to be able to cross compile the FreeBSD libc (
pkgsCross.x86_64-freebsd.freebsd.libc
), and it removes the major version number from the target tuple, as per prior discussion.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.