Closed pikajude closed 7 years ago
Are you using cabal or stack? I haven't tested with cabal in a while, maybe something broke...
cabal. I'm not using a sandbox though. This is a nix dev environment, so ghc-pkg
and friends are wrapped with a script that sets the --global-package-db.
Aha! I'll have to add a flag for setting that then, will do!
On Thu, Jan 5, 2017 at 2:25 PM Jude Taylor notifications@github.com wrote:
cabal. I'm not using a sandbox though. This is a nix dev environment, so ghc-pkg and friends are wrapped with a script that sets the --global-package-db.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/lukexi/halive/issues/19#issuecomment-270775571, or mute the thread https://github.com/notifications/unsubscribe-auth/AACw1scfoccVH3EYzOJl6IsCAIdnNFb-ks5rPW22gaJpZM4LcKNB .
A flag? Couldn't this be fallback behavior in case a cabal sandbox or stack aren't found?
Sorry, I haven't used nix — I mean halive needs to know where your global package db is but you're right that it would be more nicely implemented as an automatic behavior. Normally I get this with ghc-paths and then add the cabal and stack sandbox directories if found. Is there a shell command or environment variable I can query for where nix is keeping your package-db?
I don't have the environment variable names handy, but I was able to get the functionality I needed by adding the result of --print-global-package-db to the GHC session package DBs. I can submit the patch today as a PR
Sent from my iPhone
On Jan 6, 2017, at 3:01 AM, Luke Iannini notifications@github.com wrote:
Sorry, I haven't used nix — I mean halive needs to know where your global package db is but you're right that it would be more nicely implemented as an automatic behavior. Normally I get this with ghc-paths and then add the cabal and stack sandbox directories if found. Is there a shell command or environment variable I can query for where nix is keeping your package-db?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
Excellent, thanks for doing that!
What's going on?