Skip to content
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

musl-utils: init at 1.1.20 #49218

Closed
wants to merge 2 commits into from

Conversation

tathougies
Copy link
Contributor

@tathougies tathougies commented Oct 27, 2018

Motivation for this change

musl-utils: init at 1.1.20

Glibc provides several utilities that must exist to have a bootable system. Musl is an alternative C library ideal for embedded systems. However, it does not contain these utilities. Alpine Linux is a musl-based distribution that maintains versions of these utilities for Musl.

This is part of work I've started to get NixOS building with Musl for my ODROID-XU4 ARM device. I've confirmed these utilities work on the device, but you won't be able to build NixOS for this device with just this change. I hope this change is welcome, and I would like to bring mainline nixpkgs up to par with my branch.

I'm happy to maintain this as well!

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • [ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@symphorien
Copy link
Member

It seems iconv is already included in nixpkgs's musl: #39486
cc @dtzWill

@matthewbauer
Copy link
Member

The networking change looks good and can probably get merged right away.

But on "musl-utils" I think it makes sense to use pkgs.getent and pkgs.getconf instead in the default path. These should give you the right package based on what libc you are targeting:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/unix-tools.nix#L61-L70

I could be wrong, but I don't think there is any reason for iconv to be included in the default path. We probably need to also add a ldd package based on what libc you want (can use similar logic to libcChooser).

@tathougies
Copy link
Contributor Author

So if we use pkgs.getent, pkgs.getconf, we wouldn't need to have any conditional in the system path?

I'll split out the networking change.

@tathougies
Copy link
Contributor Author

Opening a new pull request to lessen the scope.

@dtzWill
Copy link
Member

dtzWill commented Oct 29, 2018

If you're interested in NixOS'ing w/musl, you may be interested in this branch: https://github.com/dtzWill/nixpkgs/tree/nixos-musl-staging

It's a bit messy but since it contains fixes for issues like the /etc/rpc problem, thought I'd share :).

I'll note that for /etc/rpc (see the commit history, although be warned the branch is rebase'd often) things break without it entirely and in particular the glibc /etc/rpc has a portmapper entry that was needed for, IIRC, NFS. I previously looked at grabbing this file from /etc/rpc/ but lack of this value was problematic, although likely easy enough to workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants