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

Cannot pre-build shells with nix-build #373

Closed
endgame opened this issue Sep 27, 2018 · 6 comments
Closed

Cannot pre-build shells with nix-build #373

endgame opened this issue Sep 27, 2018 · 6 comments

Comments

@endgame
Copy link
Contributor

endgame commented Sep 27, 2018

I am attempting to pre-build the dependencies of a reflex-platform project (so that my CI doesn't have to rebuild everything on each run). I tried to do this with a

nix-build -A shells.ghc --no-out-link

But the build fails with:

building '/nix/store/xlkmc1g6q1d3ds0q9fdz98nwdf3gm4lp-interactive-work-on-multi--combined-pkg-0-environment.drv'...
unpacking sources
variable $src or $srcs should point to the source
builder for '/nix/store/xlkmc1g6q1d3ds0q9fdz98nwdf3gm4lp-interactive-work-on-multi--combined-pkg-0-environment.drv' failed with exit code 1
error: build of '/nix/store/xlkmc1g6q1d3ds0q9fdz98nwdf3gm4lp-interactive-work-on-multi--combined-pkg-0-environment.drv' failed

I have been able to fudge it with a nix-shell -A shells.ghc --run ':', but it would be better if I could just build it normally.

@endgame
Copy link
Contributor Author

endgame commented Sep 27, 2018

It turns out that the nix store, after entering both a ghc and a ghcjs shell, becomes so large I cannot make a practical container out of it. I'd like to GC the nix store to try and get it smaller, but the nix-shell "workaround" above doesn't create new GC roots (AFAIK), so if I GC I lose everything. This issue is now more important to me than I first thought; is there anything I can help with to get it moving?

@ryantrinkle
Copy link
Member

Perhaps something like this would help - you may have to integrate it upstream into nixpkgs here

@ElvishJerricco
Copy link
Contributor

@ryantrinkle that stuff is going to change a bit here, which actually should make this stuff a lot easier.

@ryantrinkle
Copy link
Member

@ElvishJerricco Awesome!

@ali-abrar
Copy link
Member

Is there any action that we need to take in reflex-platform to further this along, or is this entirely an upstream issue?

@ali-abrar
Copy link
Member

It looks like nix-build -A shells.ghc --no-out-link works in the examples/project folder (added as of #506). Closing based on that, but please reopen if there's more to be done here.

matthewbauer pushed a commit that referenced this issue Nov 20, 2019
 Provide access to cookies pre- and post-hydration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants