Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Adding build-depends from executable section #1

Open
codygman opened this issue Feb 21, 2015 · 3 comments
Open

Adding build-depends from executable section #1

codygman opened this issue Feb 21, 2015 · 3 comments

Comments

@codygman
Copy link

I'm trying to run the demos from acowley/Frames.

cd ~/sources/Frames
cabbage
nix-shell --pure -p haskellngPackages.cabal-install haskellngPackages.ghc
cabal repl
*Frames> :l demo/Main.hs

demo/Main.hs:6:8:
    Could not find module `Lens.Family'
    It is a member of the hidden package `lens-family-core-1.2.0'.
    Perhaps you need to add `lens-family-core' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

demo/Main.hs:7:18:
    Could not find module `ListT'
    It is a member of the hidden package `list-t-0.4.3'.
    Perhaps you need to add `list-t' to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.
Failed, modules loaded: none.

I don't think this is the main aim of cabbage, but I bet it would be a useful use case and something not hard to work around... but could be wrong.

@acowley
Copy link
Owner

acowley commented Feb 21, 2015

This will require that the -a flag be passed to cabbage so that it gathers dependencies for all build targets. However, there were other issues with parsing of .cabal files that are now fixed. So, cabbage -a in the Frames directory should get you to a working state.

I'm verifying these fixes right now, and will comment again when it's ready to roll.

@acowley
Copy link
Owner

acowley commented Feb 24, 2015

Okay, I've updated cabbage and added a cabbage.config file to the Frames repository to tell cabbage to build the dependencies guarded by the demos flag. You will have to remove the current shell.nix so that cabbage can generate a new one, but then the usual cabbage setup should get things going. That is, cabbage && nix-shell --run 'sh $setup'.

I've tested that on OS X with nix 1.9, let me know how it goes if you give it a shot.

@codygman
Copy link
Author

Alright cool, I should be able to try it tonight.
On Feb 24, 2015 4:25 PM, "Anthony Cowley" notifications@github.com wrote:

Okay, I've updated cabbage and added a cabbage.config file to the Frames
repository to tell cabbage to build the dependencies guarded by the demos
flag. You will have to remove the current shell.nix so that cabbage can
generate a new one, but then the usual cabbage setup should get things
going. That is, cabbage && nix-shell --run 'sh $setup'.

I've tested that on OS X with nix 1.9, let me know how it goes if you give
it a shot.


Reply to this email directly or view it on GitHub
#1 (comment).

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

No branches or pull requests

2 participants