-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[WIP] ghc.withPackages: can add user arguments to wrapper #58341
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
Conversation
@peti sry to ping you in peculiar not sure who is the current haskell maintainer. I wonder where/how one could pass postBuild/makeWrapperArgs in https://github.com/NixOS/nixpkgs/pull/58341/files#diff-290b63a2b3b2ea74530c5e12f9e17c4eR3 . does my approch look sensible ? |
Honestly, I don't think that this makes much sense. First of all, you don't need to wrap Secondly, passing Personally, I would simply run
Now, all commands like |
I've always only used nix since I always had problems with either stack or cabal. I've followed your advice and created this cabal.project file:
then ran
Not sure why ghc doesn't recognize the -L flag; also I use https://github.com/haskell/haskell-ide-engine which doesn't support yet new-style so if you had an old-style recommandation, that would be great as well. |
Right I think I am making progress little by little. Closing this. |
Motivation for this change
I am trying to debug a haskell library used by my program. Everytime I change this library, I need to relaunch the nix-shell of my haskell program to get an up to date ghc environment.
My idea is to wrap the GHC with an
-i/local/lib/we/debug
. Because the library I debug is also in NIX_GHC_LIBDIR, I wonder if I can prefix NIX_GHC_LIBDIR so that ghc picks the debug version over the one in the environment.If there is a better way let me know.
One difficulty is I am not sure how to pass
postBuild
,makeWrapper
args to withPackages, the feature seem unused ?Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)