-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Haskell development shells are not very useful #196753
Comments
@ncfavier Maybe you could be more specific in what you're trying to do and what is failing? Here's an example of using a development shell for a Haskell package: $ nix develop .#haskellPackages.termonad.env
$ nix-shell -I nixpkgs=./. -p cabal-install
$ cabal get termonad-4.2.0.1
$ cd termonad-4.2.0.1/
$ cabal build This works for me (and Termonad is somewhat of a complicated package to build, since it needs many system dependencies). A couple things to note here:
|
The point is that the environment you are dropped into directly is not intended to be a development environment, it is the derivation's build environment and only useful for debugging issues in the derivation build process. That build process is relatively low level and explicit about package dbs it creates (it does create multiple ones, so that's why For development environment you want to avoid that, likely, so we provide a friendlier environment via I think the confusion stems from the original “overloading” of TL;DR: The Haskell infra distinguishes between the derivation environment shell and a development shell and this is good, actually. I've added the documentation label since this is not explicitly stated in a good place atm, but iirc I added a note about this in my in draft nixpkgs manual section. |
Thanks for writing such detailed answers to such an underspecified question! It seems like both
Agreed that there's no bug here, just needs better documentation. |
I guess that makes this a duplicate of #121403. :D |
nix develop nixpkgs#haskellPackages.foo
gives me a shell without cabal, and if I add cabal myself it fails most of the time because of a missing system dependency (pkg-config
,zlib
, ...).cc @sternenseemann @cdepillabout @maralorn
The text was updated successfully, but these errors were encountered: