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
golangci-lint does not build on darwin-x86_64 - undefined symbols #168984
Comments
I think the issue is related to this commit in upstream go golang/go@6027b21 |
The stdenv we use for nixpkgs/pkgs/tools/misc/dsq/default.nix Lines 56 to 58 in 385450e
|
@zowoq I'm a bit new to nixos, is that |
@arriven if you need it to build locally in the meantime you can create an overlay like this self: super: {
golangci-lint = super.golangci-lint.override ({
# Override https://github.com/NixOS/nixpkgs/pull/166801 which changed this
# to buildGo118Module because it does not build on Darwin.
buildGoModule = super.buildGoModule;
});
} And if you're using {
# ...
nixpkgs.overlays = [
(self: super: {
# ...
})
];
# ...
} |
Unfortunately golangci-lint breaks with Go 1.18 projects if it's built with 1.17 at the moment, so this only works if you run it in a 1.17 project. |
Fix golangci-lint according to recommendation in comment NixOS/nixpkgs#168984 (comment)
The update to 1.18 broke hugo and golangci-lint. I wasn't really using hugo, so I'm just commenting it out for now. To fix golangci-lint, add an overlay which builds it with 1.17. See: * NixOS/nixpkgs#168984 * golang/go#49616
Are there any plans to update Apple SDK on x86_64-darwin? I've been dealing with a lot of pain recently using Nix on Darwin because of that. |
There is an open issue about updating the SDK: #101229 You can try the above comment for changing the Go version back to 1.17. An alternative is using a prebuilt version of golangci-lint. For example: https://github.com/sagikazarmark/go-bin-flake (Note: it's not a very nice solution, but works for the moment) |
golangci-lint on unstable does not build on darwin-x86_64. This seems to have been caused by #166801 which switched the go version from 1.17 to 1.18 (to fix another (runtime) bug!)
See hydra: https://hydra.nixos.org/job/nixpkgs/trunk/golangci-lint.x86_64-darwin
FYI (sorry to ping but not really sure who else I would ask)
@arriven @siraben - author/merger of #166801
@Mic92 - arbitrary maintainer
The text was updated successfully, but these errors were encountered: