Skip to content

Instantly share code, notes, and snippets.

@freeman42x
Last active June 9, 2020 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freeman42x/e7c90e90e8c23d6a046eec9202a2b701 to your computer and use it in GitHub Desktop.
Save freeman42x/e7c90e90e8c23d6a046eec9202a2b701 to your computer and use it in GitHub Desktop.
Adding sub-project causes cabal build instead of using nix provided libraries
see the comment
@freeman42x
Copy link
Author

I started from this: https://github.com/fairy-tale-agi-solutions/haskell-editor-setup/tree/95e77b968e3a985120023ce8901a6268f208e730
Added 2 files in root, one executable and an install.hs and a sub-project, which you can see here:
https://github.com/fairy-tale-agi-solutions/haskell-editor-setup/tree/turtle-script

My problem is that after I make the changes, go into the nix-shell and run cabal run this causes a full cabal build instead of using the nix provided haskell libraries like before I made the changes.

@freeman42x
Copy link
Author

Running rm -rf install/ gets cabal run to use the nix provided Haskell libraries and the application runs.
So it seems that cabal run is also building the sub-project and that is what causes it to not use the nix provided libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment