-
Notifications
You must be signed in to change notification settings - Fork 116
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
dealing with Cabal "data-files" when minimizing closures #12
Comments
This sort of thing is definitely welcome in this project! Give me some time to review this more closely but I would like to include a solution for this if possible |
@shajra: Have you considered contributing this |
@Gabriel439 I just wrote it recently, so I just started vetting it here, but a next step might well be to vet it in Someone pointed out a |
So really the right solution is NixOS/nixpkgs#4504. I recommend reading that thread which also discusses this same issue |
Thanks for finding that issue and linking to it. My current thinking is that |
@Gabriel439 you may have seen this, but Eelco showed me a nifty My example-nix project has this change integrated -- in case you want to see it in play. I'll leave it to you to leave this issue open or closed as you see fit. Thanks for helping me work this out. |
I believe this is actually fixed in |
When minimizing closures, dependencies on projects like ekg that use Cabal "data-files" will have resultant binaries with baked-in references to the shared library of ekg in /nix/store. This makes the transitive closure bloat out again -- even when following the practice of statically linking and copying the final executable into a standalone derivation.
So I ended up doing the hack in this gist: https://gist.github.com/shajra/afed560778a556e487b201b5b4c2ad52
It's definitely a hack, but it works. I tried to figure out a less hacky way to do this with Cabal, but made no real progress.
This is one of those things that's half Haskell, half Nix, so it's not always clear which community to go to first for help. This project seems like a way to get some intersectional conversation.
I'll leave it to @Gabriel439's discretion of how/whether to adjust this project. I don't know if there's a point where advanced topics are more of a distraction than help. Mostly, I wanted feedback. And if we reach a consensus, we can see how it affects the guide or not.
The text was updated successfully, but these errors were encountered: