Skip to content
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

ghcWithPackages sets NIX_GHC_LIBDIR incorrectly. #20730

Closed
expipiplus1 opened this issue Nov 26, 2016 · 0 comments
Closed

ghcWithPackages sets NIX_GHC_LIBDIR incorrectly. #20730

expipiplus1 opened this issue Nov 26, 2016 · 0 comments

Comments

@expipiplus1
Copy link
Contributor

Issue description

The shell hook in the env attribute of a ghcWithPackages derivation sets NIX_GHC_LIBDIR with the ghc derivation full name, rather than just the executable name and numeric version.

This isn't usually noticed because the ghc itself is wrapped with a wrapper which provides these correctly. Tools such as HaRe fail to work in this environment though.

Steps to reproduce

Run:

nix-shell -E '((import <nixpkgs> {}).haskellPackages.callPackage ({mkDerivation, acme-dont}: mkDerivation{pname=""; version=""; libraryHaskellDepends=[acme-dont]; license=""; src=./.;}) {}).env' --run 'echo $NIX_GHC_LIBDIR'

Observe that the directory printed does not exist.

Technical details

  • Nixpkgs version: "17.03pre96205.8f63cc6"
expipiplus1 added a commit to expipiplus1/nixpkgs that referenced this issue Nov 26, 2016
Ideally the duplication between the environment shellHook and the ghc
wrapper would be removed.

Fixes NixOS#20730
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant