-
Notifications
You must be signed in to change notification settings - Fork 248
Nix Cache? #84
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
Comments
Ah, I found https://github.com/input-output-hk/cardano-sl/blob/develop/docs/nix.md and it actually fetched some stuff (but not a lot – |
There is a cachix instance at However the 50min limit means it needs perpetual manual intervention :-/ It also only builds agains In general it doesn't matter against what nixpkgs nix-tools is just your We have an abstraction even one layer above haskell.nix, which you might want to look into: https://github.com/input-output-hk/iohk-nix; this contains common utility functionality we use at IOHK. If you are after windows cross compilation, you will find a lot of patches in there related to ghc, cabal and a few other packages. Using https://github.com/input-output-hk/cardano-chain/blob/master/default.nix |
Thanks for the explation! So much layers of abstraction… hard to keep up. But if the necessary patches are in https://github.com/input-output-hk/iohk-nix I guess I won’t have a choice to look into that as well… |
While I managed to build it using a plain
|
I suspect your iohk-nix checkout is too old. Bumping it past input-output-hk/iohk-nix@ed41749 in https://github.com/entropia/tip-toi-reveng/blob/5c7495df222e270c30bd81f027da8ffb6f63b5a2/nix/iohk-nix.json should do the trick. |
This is a real concern. With the amount of patches required for trivial cross compilation of haskell projects to windows, this is a sad necessity. Once all is upstreamed, the |
oh, sorry, should have checked. Too much copy’n’pasting… now it fetched |
Ok, I can build it “normally”. Now I am really excited about the cross build … but I just can’t figure what the attribute it that builds it :-/ My best bet, setting the
does not seem to affect the output. |
With more inspiration from https://github.com/input-output-hk/cardano-chain/blob/master/release.nix I wrote this release file in entropia/tip-toi-reveng@b63408c:
and now get an error message like this:
Any ideas at this point? |
@nomeata the issue is that your You can do two things (I think), run cabal new-configure and set windows as the OS, or just add the missing packages back in: adding to yield
|
Whooho,it’s building something :-D |
So, it cross-built
|
According to https://stackoverflow.com/questions/19918173/cant-install-conduit-on-windows, people on Windows solve this by using MinGW instead of cygwin shell… not sure if and how that insight translates into the nix world.
Maybe it ever cross-built, and it just happens to be a package that is not used at IOHK, so nobody bothered to investigate? I depend on |
Ha, lower-casing the imports does the trick! |
Success!
Thanks a lot for your help! |
Next goal: Static builds for linux. Is that something that is supported by the IOHK tooling as well? Is it worth trying to build with |
hackage-to-nix tool operates on hard-coded path to global Hackage database. This commit allows to optionally specify alternative Hackage 01-index.tar file, along with Hackage url. This url is then hardcoded into generated nix expressions, to make sure that their source can be fetched when building.
hackage-to-nix tool operates on hard-coded path to global Hackage database. This commit allows to optionally specify alternative Hackage 01-index.tar file, along with Hackage url. This url is then hardcoded into generated nix expressions, to make sure that their source can be fetched when building.
I am playing around with
haskell.nix
right now, and while I am watchingnix-tools
build, I wonder if there is no nix cache with the binaries that I could use?(That would probably also require you to pin
nixpkgs
to a specific version – but wouldn’t that be good in general, so that users will know which version ofnixpkgs
this project works best with, in particular with regard to fragile things like cross-compilation?)The text was updated successfully, but these errors were encountered: