-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add haskellProjects.foo.finalPackages
to expose the final package set
#52
Comments
How about You'll have to move the overlay logic from the |
Sure, But, I'm questioning the naming of
It is straightforward to explain, viz.: "You start from base packages, apply overrides and local packages, you get final package set". |
Sounds good to me! |
haskellPackages.foo.packages
to expose the final package sethaskellProjects.foo.finalPackages
to expose the final package set
How about this API, where we group overlay-affecting settings into a submodule called haskellProjects.foo = {
devShell.enable = false;
packageSet = {
# The overlays are composed in the order they are shown here.
base = pkgs.haskell.packages.ghc944;
local = {
mypkg.root = ./.; # Assumes mypkg.cabal
};
source-overrides = { .. }; # Overrides by direct path to source
overrides = self: super: { .. }; # Raw Haskell overlay
}; Users can then use Does it make sense, from API documentation/comprehension/simplicity standpoint, to group the overlay related options like this? Or is it complex? I have a tendency introduce unnecessary abstractions, so it would be good to get some feedback here. |
Honestly: I think most interfaces are fine if they are well documented. From the face of it, I don’t see anything wrong with this one, but problems may only become apparent when using it. Grouping all related options under packageSet will probably be a bit complicated for very simple flakes, but I don’t have a strong opinion about it. Besides packageSet.final I’d like to see a read-only option like packageSet.localPackages or something where one can get all local Haskell packages (to e.g. iterate over) but does not include other packages which could also be in the default packages attribute. |
@maralorn With #63 you can access the local packages in the "foo" project using |
We want to expose the following as an option:
haskell-flake/flake-module.nix
Line 188 in 54334cf
This will be useful here: https://github.com/srid/ema-template/pull/45/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0L63
Where instead of using
lib.getExe pkgs.haskellPackages.ghcid
(incorrect, because ghcid was overriden) I can instead accurately uselib.getExe config.haskellPackages.main.finalPackages.ghcid
.The text was updated successfully, but these errors were encountered: