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

modified callPackage based on custom-default.nix file. #204

Closed
wants to merge 2 commits into from

Conversation

aravindgopall
Copy link
Collaborator

@aravindgopall aravindgopall commented Nov 11, 2023

@srid srid self-requested a review November 11, 2023 17:15
Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[As briefly talked with @aravindgopall today]

PR #204 takes the approach of externalizing the generated Nix expr to the respective repo, but this won't work for other dependency overrides like those that come from Hackage.

Since both callCabal2nix and callHackage use haskellSrc2nix underneath (which is then callPackage'ed) - we can decouple the exact point where haskellSrc2nix is run. Basically cache the output of haskellSrc2nix in a set of local files (./.haskellSrc2nix/aeson-2.0.0.0.nix, etc.) as part of a flake app. Then have haskell-flake use that cache instead of evaluating using call* family of functions (this behaviour can be toggled using a flag). Add a flake check and/or a pre-commit hook to check the consistency of this cache.

This way, we should be able to avoid IFD without needing to define our own package set from scratch. ie., we still use pkgs.haskellPackages but generate only the local and overridden dependencies.

I'll take a look at exploring this.

EDIT: Discussion on this at https://nixos.zulipchat.com/#narrow/stream/413949-haskell-flake/topic/Removing.20IFD

@srid
Copy link
Owner

srid commented Feb 22, 2024

Superceded by #231

@srid srid closed this Feb 22, 2024
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

Successfully merging this pull request may close these issues.

2 participants