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

callCabal2nix default.nix is garbage collected #36190

Closed
ElvishJerricco opened this issue Mar 1, 2018 · 6 comments
Closed

callCabal2nix default.nix is garbage collected #36190

ElvishJerricco opened this issue Mar 1, 2018 · 6 comments

Comments

@ElvishJerricco
Copy link
Contributor

When using callCabal2nix, the resulting derivation has no gc link to the IFD'd default.nix. I think this should be added as a build time dependency so that cabal2nix doesn't get collected, and so you don't have to repeatedly wait for the derivation to be built. It's minor, but enough to be annoying.

@ElvishJerricco
Copy link
Contributor Author

/cc @shlevy @peti

@shlevy
Copy link
Member

shlevy commented Mar 2, 2018

👍 from me.

@peti
Copy link
Member

peti commented Mar 2, 2018

I'm not sure whether I understand this correctly. You want to prevent the garbage collector from collecting a file that it could collect so that this file doesn't have to be re-built even though it can be re-built?

@shlevy
Copy link
Member

shlevy commented Mar 2, 2018

@peti It would only be a build-time dependency, and thus only kept if keep-derivations and keep-outputs are both true. Those settings indicate "I don't want to have to do any work to rebuild things I already have and I'll take the disk hit"

@peti
Copy link
Member

peti commented Mar 2, 2018

Hmm, okay. That sounds fine.

shlevy added a commit to shlevy/nixpkgs that referenced this issue Mar 2, 2018
This ensures that as long as the package derivation is alive, its nix
expressions do not need to be regenerated.

Fixes NixOS#36190.
@ncfavier
Copy link
Member

Just pointing out that #36216 was reverted by #194753 to avoid rebuilds, but you can still explicitly add a GC root on haskellPackages.foo.cabal2nixDeriver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants