-
Notifications
You must be signed in to change notification settings - Fork 83
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
Is buildBazelPackage
from nixpkgs supposed to work?
#73
Comments
Hm, the problem seems to come from rules_nixpkgs/nixpkgs/nixpkgs.bzl Line 60 in 40b5a9f
|
This is what I understand you are trying to do: Use Is that correct? |
Hm, good question. I'm trying to use The point is, I want to package up a |
Nope, it’s the right approach. So the problem I see is that your application uses |
I am hitting the same issue. You can kind of make it work with a fake |
@Profpatsch the repo is https://github.com/TreeTide/underhood. I would be thankful if you could point me how to get it built. I plan to use a nix-based GitLab CI runner by the way. Wondering if the Bazel build cache could survive. But first would be happy if it worked at all. (Note: when deploying, I now manually |
You’ll have to replace
in your If you are lucky, it is enough to change |
@Profpatsch thanks, got quite far using If that gets sorted, I will post a working example. Update: this seems to be working now (see the linked issue), but I have some trouble setting up the nixy cc_toolchain yet. Will post about progress. Update: turns out I just forgot to uncomment the cc_toolchain setup. Victory! |
Nice! Does this mean I can close this then? Is there some best practices documentation we can get out of this? |
Closing it, thx! Will ping with an example (now got it to build with buildBazelPackage, just want to see if it would work on Hydra as well). |
FYI posted full example of a Nix + Bazel + Haskell repo, which can build both with bazel on command-line, as well as bazel from inside nix-build, at https://github.com/TreeTide/haskell-bazel-nix-template. |
Ouch. Is there no way around this? |
Can't we patch |
Maybe the situation could be improved using Bazel's |
Fwiw, Nix has an experimental support for “recursive-nix` (see NixOS/nix#3205) which could be used for this |
When I try, I get:
This is not much error to help troubleshooting, but asking first to see if you attempted and succeeded already.
The text was updated successfully, but these errors were encountered: