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

darwin: Big Sur-compatible stdenv bootstrap #107013

Merged
merged 2 commits into from Dec 30, 2020

Conversation

thefloweringash
Copy link
Member

@thefloweringash thefloweringash commented Dec 16, 2020

Motivation for this change

Bootstrapping nixpkgs on Big Sur.

Darwin seems to be broken on staging, so the first commit is a quick workaround. It's included here for testing, but should be fixed properly and dropped from this PR.

Fixes #104580
Includes changes from https://gist.github.com/LnL7/a17a042dd21258b957279637bb6be627

Prequisites for merging:

  • upload and reference bootstrap tools via tarballs.nixos.org
  • create a darwin-stubs tarball
  • drop the [HACK] commit
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@thefloweringash thefloweringash marked this pull request as draft December 16, 2020 09:16
@thefloweringash thefloweringash changed the title Big sur bootstrap darwin: Big Sur-compatible stdenv bootstrap Dec 16, 2020
pkgs/os-specific/darwin/darwin-stubs/default.nix Outdated Show resolved Hide resolved
pkgs/stdenv/darwin/default.nix Outdated Show resolved Hide resolved
pkgs/stdenv/darwin/default.nix Show resolved Hide resolved
pkgs/stdenv/darwin/default.nix Outdated Show resolved Hide resolved
Fixes bootstrapping on macOS Big Sur.
The bootstrap tools are now aligned.

This reverts commit c5b0f56.
@thefloweringash
Copy link
Member Author

The changes that broke the darwin stdenv on staging have been reverted, and I've now tested this as is on Catalina and Big Sur. This should be ready for review / good to go.

@edude03
Copy link
Contributor

edude03 commented Dec 28, 2020

[nix-shell:~/code/nixpkgs]$ neofetch
                    'c.          edude03@Michaels-BaeBook.local
                 ,xNMM.          ------------------------------
               .OMMMMo           OS: macOS Big Sur 10.16 20C69 x86_64
               OMMM0,            Host: MacBookPro16,1
     .;loddo:' loolloddol;.      Kernel: 20.2.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 13 days, 18 hours, 51 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 3 (brew), 44 (nix-user)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: bash 4.4.23
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 3072x1920
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Light)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: MesloLGLForPowerline-Regular 12
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Intel i9-9880H (16) @ 2.30GHz
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Intel UHD Graphics 630, AMD Radeon Pro 5500M
       .cooc,.    .,coo:.        Memory: 19390MiB / 32768MiB

Thank you @thefloweringash & @LnL7 using this branch I can finally run nix on a clean OSX Big Sur Install 🙏🏽 it's a Christmas miracle 🎄

I ran NIX_PATH=nixpkgs=$PWD nix-shell -p nix-info neofetch -j 16 with this branch and it finally works. Though minor note - with the -j 16 it bombed at about 70% of the way (estimate) due to an automake error. AFAICT this shouldn't happen, and it went away when I ran it again without -j 16 but I figured I should mention it.

@matthewbauer
Copy link
Member

Looks good to me. Tested that everything works along with #107262. Merging now.

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

Successfully merging this pull request may close these issues.

None yet

4 participants