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

project environment #138

Open
MMesch opened this issue Oct 15, 2018 · 2 comments
Open

project environment #138

MMesch opened this issue Oct 15, 2018 · 2 comments

Comments

@MMesch
Copy link

MMesch commented Oct 15, 2018

is there a smart way to generate a cabal environment for a project that does not contain a top level package?

E.g. a stack.yaml file that contains:

packages:
  - package1
  - package2
  - package3

I can do nix-shell -A package1.env default.nix but I will only get the dependencies of package1. It would be nice to get the combined environments of package1, package2, package3.

I can do this manually, getting all dependencies with stack ls dependencies or something similar ...

@MMesch MMesch changed the title meta package environment project environment Oct 15, 2018
@domenkozar
Copy link
Contributor

This is probably a nixpkgs issue, how to compose haskell environments.

@cdepillabout
Copy link
Contributor

cdepillabout commented Nov 6, 2018

There is actually a shellFor function that may be able to be used in the above situation.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/haskell-modules/make-package-set.nix#L234-L304

However, you have to manually specify the packages you want to use as arguments to shellFor.

It would be nice if stack2nix somehow produced a list of packages that are actually "local packages defined in stack.yaml" (instead of dependencies pulled from stackage). That list of packages would be able to be easily used in functions like shellFor.

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

3 participants