Skip to content

go_bootstrap: remove top-level attribute#113113

Merged
kalbasit merged 1 commit intoNixOS:masterfrom
zowoq:goboot
Feb 15, 2021
Merged

go_bootstrap: remove top-level attribute#113113
kalbasit merged 1 commit intoNixOS:masterfrom
zowoq:goboot

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 zowoq requested review from Mic92 and kalbasit as code owners February 14, 2021 12:21
@ofborg ofborg bot added 6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Feb 14, 2021
@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

Labels

6.topic: golang Go is a high-level general purpose programming language that is statically typed and compiled. 8.has: clean-up This PR removes packages or removes other cruft 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

3 participants