-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
Switch Nixpkgs to using more NetBSD stuff for MUSL #41320
Conversation
Success on x86_64-linux (full log) Attempted: libbsd Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libbsd Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libbsd Partial log (click to expand)
|
@GrahamcOfBorg build mg |
Failure on aarch64-linux (full log) Attempted: mg Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: mg Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: mg Partial log (click to expand)
|
@@ -21462,6 +21457,10 @@ with pkgs; | |||
mount wall hostname more sysctl getconf | |||
getent; | |||
|
|||
fts = if hostPlatform.isMusl then netbsd.fts else null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there is some meta.available
thing you can do instead of null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be provided by most libcs except for Musl. It will build everywhere, just runs on Musl.
Success on x86_64-linux (full log) Attempted: libbsd Partial log (click to expand)
|
Success on x86_64-darwin (full log) Attempted: libbsd Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libbsd Partial log (click to expand)
|
I don't understand what this means. Why would we want to use "more NetBSD stuff"? If the goal is to move away from GNU, 👎. |
I should have been more clear. This gets our BSD derivations directly from the upstream NetBSD CVS tree. Previously we were relying on "Linux"ized derivations of BSD sources. There are basically two things this changes:
|
@edolstra yeah even more pithily put, this is not moving away from GNU, but just using upstream version of the non-GNU stuff we already use. |
This broke samba build, now discussed on #nixos-dev with @7c6f434c. |
a partial rollback of NixOS#41320 samba is already Linux-only because of acl, and it is unclear what the problem is with upstream netbsd-compat.
This has broken all packages that depend on libbsd, and the reason is obvious if you compare the
where
Clearly nbcompat can not replace libbsd. |
Yes if someone wants to undo the |
OK, I'll undo I have noticed that having a direct or an indirect dependency on
and e.g. this file compiles and runs:
Is this |
It may not be necessary any more but it definitely was at one point. The NetBSD derivations are built on top of this so they need those defines to avoid compatibility issues. This is supposed to get you to a BSD-compatible system. I can look into either disabling the default or making it optional though. |
If only stuff under |
This reverts commit 480434f. netbsd.compat does not provide include files that are provided by libbsd [1], and it encumbers its transitive dependents with an obligatory include file that setups BSD-compatible C environment [2]. [1] NixOS#41320 (comment) [2] NixOS#41320 (comment)
Sorry, I was wrong about indirect dependencies in:
I have tested this with a package that indirectly depended on However, a package with |
Motivation for this change
This gets rid of some of the Musl specific stuff that was being pulled indirectly from NetBSD sources. Libbsd is also replaced with NetBSD compat. More testing is still needed.
This gets our BSD derivations directly from the upstream NetBSD CVS tree. Previously we were relying on "Linux"ized derivations of BSD sources (slightly modified versions of the original BSD sources). There are basically two things this changes: