Skip to content

Specifying different package sets for packages within the same project #205

Answered by srid
newton-migosi asked this question in Q&A
Discussion options

You must be logged in to vote

The current version in the example only caters to using the default project.cabal https://github.com/srid/haskell-multi-nix/blob/c85563721c388629fa9e538a1d97274861bc8321/flake.nix

Local packages can be specified in the same manner as packages pointing to custom source paths: https://zero-to-flakes.com/haskell-flake/dependency#path

If you want them to use different package sets, you want to define distinct projects (because each project has its own package set and overrides):

haskellProjects.frontend-project = {
  packages = {
    frontend.source = ./frontend;
  };
};

haskellProjects.backend-project = {
  packages = {
    backend.source = ./backend;
  };
};

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@newton-migosi
Comment options

Comment options

You must be logged in to vote
1 reply
@newton-migosi
Comment options

Answer selected by newton-migosi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants