-
Notifications
You must be signed in to change notification settings - Fork 237
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
Dev environments #12
Dev environments #12
Conversation
Can you do the haddock portion in a separate PR? |
The issue with this is only that we don't have a way to do the whole package. But I don't think the right answer is to compromise the idea of building and shelling sharing a derivation. Instead, I think we should have an |
Making the |
OK thanks. I have just started to try and understand this code so please excuse the mistakes.
Where would the In the nix-shell of a library component I have |
d23b080
to
b589689
Compare
@ElvishJerricco Thanks for the tips. How is the I added a simple test case in The variable is set correctly, but cabal-install doesn't pick it up. Also, how would that work for the non-cabal use case -- for example, if the user would just like to use ghc/ghci? |
@rvl could we use https://downloads.haskell.org/~ghc/master/users-guide/packages.html#package-environments for ghc/ghci? |
@rvl yea, |
@rvl I'm surprised cabal-install didn't pick it up. I'll try to experiment with this stuff shortly. I think we need to decide whether we want everything configured for the shell via environment variables, or via wrapper scripts. I loathe wrapper scripts, but unfortunately they seem to work really well. |
Hi, yes I agree the wrapper scripts are not ideal. We do need something that works for IOHK projects however. Interested to know the result of your experiments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍 for the documentation! Guess we are now set on markdown docs :-)
Thanks for the research and documentation on the environment variables. FWIW, Also, is it possible to avoid aggregating all the package DBs into a mass package DB by using a GHC environment file in the wrapper script? That DB ends up quite large and wasteful on disk, and takes time to create. I'd really like to avoid both long command line argument lists and large wasteful package DBs is environment files enable it. |
(mapAttrsToList (_: c: c.depends or []) config.components.${sub} or {}); | ||
default = { | ||
depends = config.components.library.depends ++ | ||
concatMap subComponentsDepends haskellLib.subComponentTypes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why concat all the depends when we could just mkMerge
the components themselves and have their other attributes like system library deps merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I haven't figured it out yet. In the meantime I have raised #42 for this.
Changes so that this builder can be used to set up dev environments.
pkgSet.config.hsPkgs.PACKAGE.components.all
attribute.Things to fix:
ghcWithPackages
, but I found that difficult.library
,exes
andtests
components. Need to make anall
component which combines all components of the package, and base the shell on that.