-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
grafana: fix build failure on darwin #297968
Conversation
Good news! the package successfully builds on Unfortunately, it fails on Later it fails to build https://github.com/mattn/go-ieproxy, which seems to be related to #243298 (comment) Error while trying to build
|
@@ -56,14 +57,16 @@ buildGoModule rec { | |||
dontInstall = true; | |||
dontFixup = true; | |||
outputHashMode = "recursive"; | |||
outputHash = "sha256-QdyXSPshzugkDTJoUrJlHNuhPAyR9gae5Cbk8Q8FSl4="; | |||
outputHash = if stdenv.isLinux then "sha256-3CZgs732c6Z64t2sfWjPAmMFKVTzoolv2TwrbjeRCBA=" else "sha256-NKEajOe9uDZw0MF5leiKBIRH1CHUELRho7gyCa96BO8="; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The if/else here is wrong because we don't just have Linux or Darwin (see lib.platforms
) even though they're less well-known.
We should either do an if/else if for stdenv.isLinux
/stdenv.isDarwin
and throw on else if we're sure that for each Darwin and Linux the hash is the same (please check that then).
The other option would be to specify hashes explicitly per platform:
hash = {
x86_64-linux = "hash1";
aarch64-darwin = "hash2";
aarch64-linux = "hash3";
}.${system} or throw "Unsupported system";
This has the downside that we'll duplicate hashes for Linuxes though.
In any case, please make sure that we don't allow any platform in meta.platforms
that's excluded / unsupported here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out, using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nixpkgs-review
happy, macos 12 x86_64 & nixos x86_64
Could you squash the commits? Or at least, if you think they really deserve to be separate commits, prefix each of the messages with |
* use xcbuild.xcbuild, which is dep for @esfx/equatable; fix 'aligned_alloc' error * frontend's offlineCache: don't allow platforms other than the one's mentioned in `meta.platforms`
6df2921
to
f5e4841
Compare
@risicle I have squashed the commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think meta.platforms
should be restricted to x86_64-{darwin,linux}
, aarch64-{darwin,linux}
.
After that this is good to go, thanks!
fixed here: NixOS/nixpkgs#297968 Also, hydra-checks pass on all four platforms: ```sh shivaraj in 🌐 nixos in ~ ❯ nix run github:nix-community/hydra-check -- grafana --arch aarch64-darwin Build Status for grafana.aarch64-darwin on jobset nixpkgs/trunk ✔ grafana-10.4.1 from 2024-03-27 - https://hydra.nixos.org/build/254421303 shivaraj in 🌐 nixos in ~ took 45s ❯ nix run github:nix-community/hydra-check -- grafana --arch x86_64-darwin Build Status for grafana.x86_64-darwin on jobset nixpkgs/trunk ✔ grafana-10.4.1 from 2024-03-27 - https://hydra.nixos.org/build/254422747 shivaraj in 🌐 nixos in ~ ❯ nix run github:nix-community/hydra-check -- grafana --arch x86_64-linux Build Status for nixpkgs.grafana.x86_64-linux on jobset nixos/trunk-combined ✔ grafana-10.4.0 from 2024-03-27 - https://hydra.nixos.org/build/254385494 shivaraj in 🌐 nixos in ~ ❯ nix run github:nix-community/hydra-check -- grafana --arch aarch64-linux Build Status for nixpkgs.grafana.aarch64-linux on jobset nixos/trunk-combined ✔ grafana-10.4.0 from 2024-03-27 - https://hydra.nixos.org/build/254392946 ```
Description of changes
resolves #273998
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.