Skip to content

darwin: Big Sur-compatible stdenv bootstrap#107013

Merged
matthewbauer merged 2 commits intoNixOS:stagingfrom
thefloweringash:big-sur-bootstrap
Dec 30, 2020
Merged

darwin: Big Sur-compatible stdenv bootstrap#107013
matthewbauer merged 2 commits intoNixOS:stagingfrom
thefloweringash:big-sur-bootstrap

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
@ofborg ofborg bot added 6.topic: stdenv Standard environment 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. labels Dec 16, 2020
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Dec 16, 2020
Fixes bootstrapping on macOS Big Sur.
The bootstrap tools are now aligned.

This reverts commit c5b0f56.
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Dec 22, 2020
@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.

@thefloweringash thefloweringash marked this pull request as ready for review December 22, 2020 08:31
@edude03
Copy link
Contributor

edude03 commented Dec 28, 2020

[nix-shell:~/code/nixpkgs]$ neofetch
                    'c.          [email protected]
                 ,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

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

Status: Big Sur

Development

Successfully merging this pull request may close these issues.

4 participants