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
Unix-tools: Cleanup and more tweaks #38712
Conversation
This prevents big closures from getting pulled in.
Eventually I want to rename "musl-getconf" and "musl-getent" to something like "bsd-getconf" and "bsd-getent" and change to upstream (NetBSD provides these files but they work on Linux as well). |
After much confusion from my side: If |
Ok thanks! Note that this will go into staging and could take a while to finally get merged back into master. |
linux = pkgs.musl-getconf; | ||
darwin = pkgs.darwin.system_cmds; | ||
}; | ||
getent = singleBinary "getconf" { |
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.
This should be "getent"
.
Also, the musl-getconf/musl-getent (or bsd-getent/bsd-getconf)
a) Don't build w/glibc currently due to use of strlcpy
, which means as-is this breaks all the things :(. We may be able to pull in libbsd or something to fix.
b) May not be appropriate for use with glibc, I cannot say. It may be worthwhile to compare getconf -a
, and investigate getent
differences. I don't know if these differences matter in practice/our usage or not.
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.
Okay addressed in 27dd872.
So my hope is that any unix tools would just depend on the "kernel" - not the Libc. Definitely want to investigate whether there is a way to patch musl-* to work with glibc.
We should probably change the condition from hostPlatform.isMusl
to !hostPlatform.libc.isGNU
but leaving it for now so we don't accidentally break anything more.
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.
Okay, TYVM for the quick fix! I very much support the motivation/direction, thanks for pursuing it!
This should hopefully improve things. Hope to merge it quickly. Please comment if any objections!