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

go_bootstrap: remove top-level attribute #113113

Merged
merged 1 commit into from
Feb 15, 2021
Merged

go_bootstrap: remove top-level attribute #113113

merged 1 commit into from
Feb 15, 2021

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Feb 14, 2021

Motivation for this change

Fixes #110794

Closes #73643
Closes #88315
Closes #93989
Closes #96786
Closes #99778
Closes #106194
Closes #106195
Closes #109174
Closes #109175

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.

cc @NixOS/golang

this package should only be used internally for go_*
@zowoq
Copy link
Contributor Author

zowoq commented Feb 14, 2021

@ofborg build go_1_14 go_1_15 podman

Copy link
Member

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

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

🎉

@kalbasit kalbasit merged commit d9be3c7 into NixOS:master Feb 15, 2021
@kalbasit kalbasit mentioned this pull request Feb 15, 2021
10 tasks
srcOnly {
name = "go-1.8-linux-arm64-bootstrap";
src = fetchurl {
url = "https://cache.xor.us/go-1.8-linux-arm64-bootstrap.tar.xz";
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is still not accessible if not for cache.nixos.org:

* SSL: no alternative certificate subject name matches target host name 'cache.xor.us'

It also doesn't feel very trustworthy.

How do you feel about bootstrapping from golang.org binary packages repackaged to look like bootstrap? I have the following for aarch64-darwin locally:

      (srcOnly {
        name = "go-1.16-rc1-darwin-arm64-bootstrap";
        src = fetchurl {
          url = "https://golang.org/dl/go1.16rc1.darwin-arm64.tar.gz";
          sha256 = "1p9l9qrh5x06jw19bnyfz8hfq6fisxzhc39cq6gwg4xcvn7gxq7m";
        };
      }).overrideAttrs (_: rec {
        installPhase = ''
          mkdir -p $out/share/go $out/bin
          mv bin/* $out/bin
          cp -r . $out/share/go
        '';
      })

Same idea would apply to aarch64-linux here, or to any arch that cannot be bootstrapped from go1.4.

Copy link
Member

Choose a reason for hiding this comment

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

This was partially discussed in #110794, IMO please open a new issue so we can discuss it. Personally, I think it would be fine.

@zowoq zowoq deleted the goboot branch February 15, 2021 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment