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

Support multiple public libraries #448

Open
expipiplus1 opened this issue Apr 2, 2020 · 2 comments
Open

Support multiple public libraries #448

expipiplus1 opened this issue Apr 2, 2020 · 2 comments

Comments

@expipiplus1
Copy link
Contributor

Cabal 3 supports multiple public libraries in a single package (and support is hopefully coming to hackage soon (haskell/hackage-server#852)), it would be great if cabal2nix (and hackage2nix) would support such a feature.

I'm not sure exactly what shape the output could take, perhaps putting sub-libraries in passthru would be cool.

@gwils
Copy link

gwils commented Feb 18, 2021

This would be helpful for me and my team.

@Shimuuar
Copy link

Current state of support of public sublibraries is quite curious:

  1. When package is built by nix all sublibraries are built and installed. There's no way to build package per component
  2. Nix can build packages which depends on sublibrary in another package just fine.
  3. Yet in environment created by ghcWithPackages modules from public sublibraries couldn't be imported. It gives following error:
    Could not load module ‘Bench.Vector.Algo.Leaffix’
    It is a member of the hidden package ‘vector-0.13.2.0:benchmarks-O2‘

In similar way cabal build cannot find sublibraries in an environment and tries to install them separately

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

No branches or pull requests

4 participants