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

treewide: platforms.gnu -> gnu ++ linux, allow using musl #39773

Merged
merged 4 commits into from May 1, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Apr 30, 2018

Many packages have use platforms.gnu as an "arbitrary choice",
others perhaps because at some point this indicated more
than building w/Linux.

Whatever the reason, for most (nearly all) packages
platforms.gnu is overly pessimistic and in particular
effectively means "all Linux triples that don't use musl".

This PR extends these to include all linux platforms,
while keeping platforms.gnu in case we ever support
non-Linux gnu platforms again.

No rebuilds should be required.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

"platforms.gnu" has been linux-only since at least 17.03:

$ nix eval -f channel:nixos-17.03 lib.platforms.gnu
[ "i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mips64el-linux" ]

Unlike platforms.linux, platforms.gnu indicates "must use glibc"
which for the most part is not intended.

Replacing platforms.gnu with platforms.linux would be the same "today"
but let's err on preserving existing behavior and be optimistic
about platforms these packages work on.
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: mtools

Partial log (click to expand)

these paths will be fetched (0.15 MiB download, 0.35 MiB unpacked):
  /nix/store/1l44jp94ikkpnsfnylq891rwcv2jl2sc-mtools-4.0.18
copying path '/nix/store/1l44jp94ikkpnsfnylq891rwcv2jl2sc-mtools-4.0.18' from 'https://cache.nixos.org'...
/nix/store/1l44jp94ikkpnsfnylq891rwcv2jl2sc-mtools-4.0.18

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: mtools

Partial log (click to expand)

these paths will be fetched (0.16 MiB download, 0.39 MiB unpacked):
  /nix/store/yycnjb9xqrh1sx7g97z4nf9yg7bcvznx-mtools-4.0.18
copying path '/nix/store/yycnjb9xqrh1sx7g97z4nf9yg7bcvznx-mtools-4.0.18' from 'https://cache.nixos.org'...
/nix/store/yycnjb9xqrh1sx7g97z4nf9yg7bcvznx-mtools-4.0.18

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: mtools

Partial log (click to expand)

these paths will be fetched (0.15 MiB download, 0.37 MiB unpacked):
  /nix/store/wd7ncsm0fmwa7jvq4n9bqkdr29mavk66-mtools-4.0.18
copying path '/nix/store/wd7ncsm0fmwa7jvq4n9bqkdr29mavk66-mtools-4.0.18' from 'https://cache.nixos.org'...
/nix/store/wd7ncsm0fmwa7jvq4n9bqkdr29mavk66-mtools-4.0.18

@dtzWill dtzWill merged commit dc48863 into NixOS:master May 1, 2018
@@ -48,6 +48,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl3Plus;

maintainers = [ ];
platforms = stdenv.lib.platforms.gnu;
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be stdenv.lib.platforms.unix (it works on Darwin)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing! Okay, I'll address this shortly. Hooray for working on more platforms! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: emacs 6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants