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_1_16: init at 1.16 #107937

Merged
merged 1 commit into from Feb 16, 2021
Merged

go_1_16: init at 1.16 #107937

merged 1 commit into from Feb 16, 2021

Conversation

c00w
Copy link
Contributor

@c00w c00w commented Dec 30, 2020

This allows us to sort out go1.16 in time for its release.

Changes are minor - I ended up just patching the ssl certs at the root
file, rather than trying to keep up with the various darwin changes.

The externalnetwork test helper location changed, to so I had to update
that patch as well.

Motivation for this change

go1.16beta1 is available - go1.16 should drop in febuary.

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.

pkgs/development/compilers/go/1.16.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Show resolved Hide resolved
@zowoq
Copy link
Contributor

zowoq commented Jan 6, 2021

Built on darwin.

@c00w
Copy link
Contributor Author

c00w commented Jan 11, 2021

@kalbasit @Mic92 - any thoughts / chance you can merge?

@zowoq
Copy link
Contributor

zowoq commented Jan 29, 2021

Updated to 1.16rc1 and applied two treewide changes to match go_1_* on master:

  • pkgconfig -> pkg-config
  • stdenv.lib -> lib

@zowoq zowoq changed the title go_1_16: init at 1.16beta1 go_1_16: init at 1.16rc1 Jan 29, 2021
@zowoq
Copy link
Contributor

zowoq commented Jan 30, 2021

Updated the GO_NO_VENDOR_CHECKS patch for 1.16 that it's in master.

cc @adisbladis

@bobrik
Copy link
Contributor

bobrik commented Feb 7, 2021

Either this or #112248 will need a rebase once one of them is merged.

++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];

depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ];
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you also need the following for 1.16 (plus xcbuild in inputs):

propagatedBuildInputs = optionals stdenv.isDarwin [ xcbuild ];

See: golang/go@7e25bdb

Otherwise you won't be able to link packages inside of Nix build environment:

/nix/store/61kpq6gcyp94j87ni6i12vl4vpmsgb02-go-1.16rc1/share/go/pkg/tool/darwin_amd64/link: /nix/store/61kpq6gcyp94j87ni6i12vl4vpmsgb02-go-1.16rc1/share/go/pkg/tool/darwin_amd64/link: running dsymutil failed: exec: "xcrun": executable file not found in $PATH

Go will still work outside of Nix if you run go, because it will find /usr/bin/xcrun from developer tools.

@kalbasit
Copy link
Member

Please update to reflect the removal of go_bootstrap in #113113

@bobrik
Copy link
Contributor

bobrik commented Feb 15, 2021

Changes from #112248 should also be picked up.

@zowoq
Copy link
Contributor

zowoq commented Feb 16, 2021

Updated/rebased on master to include #112248 and #113113.

@github-actions
Copy link
Contributor

Failed to rebase

@bobrik
Copy link
Contributor

bobrik commented Feb 16, 2021

Good to merge now? I can address #107937 (comment) in a separate PR.

@zowoq
Copy link
Contributor

zowoq commented Feb 16, 2021

Good to merge now?

I was going to wait until 1.16 is released and merge that.

@bobrik
Copy link
Contributor

bobrik commented Feb 16, 2021

Seems reasonable to incorporate my change to not break darwin down to road then.

@bobrik
Copy link
Contributor

bobrik commented Feb 16, 2021

Today is the day: https://github.com/golang/go/releases/tag/go1.16.

The source file is already available at the expected URL, even if https://golang.org/dl/ is not yet updated.

Changes are minor - I ended up just patching the ssl certs at the root
file, rather than trying to keep up with the various darwin changes.

The externalnetwork test helper location changed, to so I had to update
that patch as well.

- Add xcbuild as propagatedBuildInput on darwin golang/go@7e25bdb
@zowoq
Copy link
Contributor

zowoq commented Feb 16, 2021

... even if https://golang.org/dl/ is not yet updated.

It's been updated.

Seems reasonable to incorporate my change ...

Added xcbuild.

@zowoq zowoq changed the title go_1_16: init at 1.16rc1 go_1_16: init at 1.16 Feb 16, 2021
@bobrik
Copy link
Contributor

bobrik commented Feb 16, 2021

LGTM.

@zowoq
Copy link
Contributor

zowoq commented Feb 16, 2021

Built on x86_64-{darwin,linux}

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

Successfully merging this pull request may close these issues.

None yet

6 participants