-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
haskellPackages.shellFor creates invalid NIX_GHC_DOCDIR #150666
Comments
That is a very good observation. Of course the burning question is: Has this ever worked or what changed? In the wrapper code we have Instead the docs dir is apparently part of the It’s a typical "how can this ever have worked" situation. Can someone shed a bit of light on this? @KAction May I ask how you discovered this? Is there a concrete use case which was broken by this? |
Well, I started new Haskell project with template from here: https://github.com/utdemir/hs-nix-template, and it happened to generate default.nix which called Actually, if you provide |
Yeah, to be honest, I wouldn‘t actually know how to typically access the config without using hoogle as an entry point. And that usecase works. So I am curious for which situation we need the variable. |
As the most straightforward solution we may set this variable only if withHoogle is set, and change its value. Not sure that it is safe, since its value is inspected by GHC itself. |
We could create such a directory using |
Before this commit it pointed to non-existent directory, now it points to GHC user manual. What is more important, now $NIX_GHC_DOCDIR/../.. contains documentation with all dependenices, one subdirectory for dependency. Closes: NixOS#150666
Before this commit it pointed to non-existent directory, now it points to GHC user manual. What is more important, now $NIX_GHC_DOCDIR/../.. contains documentation with all dependenices, one subdirectory for dependency. Closes: NixOS#150666
* Will make it so that GHC.Paths's docdir NIX_GHC_DOCDIR points to an actual directory. * Documentation of all packages in the environment is available in `$out/share/doc`. This has previously been attempted in NixOS#76842 and reverted in NixOS#77442, since documentation can collide when the libraries wouldn't (thanks to the hash in the lib filename). `symlinkJoin` allows collision, so this solution should be akin to NixOS#77523 (minus `buildEnv`, one step at a time). `installDocumentation = false` restores the old behavior. Collision in the documentation only happen if the dependency closure of the given packages has more than one different derivation for the same library of the very same version. I'm personally inclined not to claim that our infrastructure does anything sensible in this case. Additionally, the documentation is likely largely the same in such cases (unless it is heavily patched). Resolves NixOS#150666. Resolves NixOS#76837. Closes NixOS#150968. Closes NixOS#77523.
Describe the bug
haskellPackages.shellFor function creates environment with
NIX_GHC_DOCDIR
variable set to non-existent path.
Steps To Reproduce
Expected behavior
$NIX_GHC_DOCDIR
points to directory with html documentation of alldependencies.
Notify maintainers
@peti
@cdepillabout
@expipiplus1
@maralorn
@sternenseemann
@cstrahan
Metadata
The text was updated successfully, but these errors were encountered: