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

cabal2nix --shell doesn't include libraryToolDepends in environment #331

Closed
mpickering opened this issue Feb 8, 2018 · 3 comments
Closed
Labels

Comments

@mpickering
Copy link
Contributor

My workflow is usually

cabal2nix --shell . > shell.nix
nix-shell
cabal configure
cabal build

If the project uses happy or alex then these are not available in the shell environment as libraryToolDepends is not part of propagatedBuildInputs.

@peti peti added the bug label Feb 8, 2018
@peti
Copy link
Member

peti commented Feb 9, 2018

I cannot re-produce this issue (on master):

nix-shell "<nixpkgs>" --pure -A haskellPackages.ViennaRNA-bindings --run "type -pa c2hs"
/nix/store/pm7fq77pzyprwkp8vbw5cqqc9raimn58-c2hs-0.26.2-28-g8b79823/bin/c2hs
/nix/store/pm7fq77pzyprwkp8vbw5cqqc9raimn58-c2hs-0.26.2-28-g8b79823/bin/c2hs

The build tool c2hs shows up in $PATH. Generally speaking, the environment contains systemBuildInputs, not propagatedBuildInputs.

@mpickering
Copy link
Contributor Author

https://gist.github.com/1f6d8fbf4b3d178c33c0a23b1f6f831a

I am starting with cogent.cabal. shell.nix is the generated shell.nix file with a lot of the dependencies removed (it still fails with the generated file). After running nix-shell, alex is not available on the command line.

@peti
Copy link
Member

peti commented Feb 9, 2018

This is all very confusing. Anyway, I've committed a fix in NixOS/nixpkgs@bd3379c. I hope it works okay. :-)

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

No branches or pull requests

2 participants