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
Building a package with "src = ./." can fail if the "dist" directory has been set-up outside of Nix #112
Comments
I think I've been working around this by running Would it make more sense for |
I am not sure where So modifying One option might be to put the |
I don't think that this feature belongs into the default Cabal builder. IMHO, it would be fine to have an extended version of |
I think I'd still argue for |
Alternatively, what if |
Seems cabbage uses sdist, https://github.com/acowley/cabbage/blob/master/Nix-notes.org |
actually, I think there should just be a general purpose
And
Then you use
And then in the
|
default.nix
in local dir, dist
directory should be ignored
IMHO, it would be easiest if |
I would still suggest that the |
I agree that using sdist is nice. I'll have to experiment with that approach a little, though, to understand the implications better.
|
The lack of more granular control over the source path is a major pain point for me. Most projects I write nowadays include some script to edit the generated nix file to add a |
This has become even more of a pain point now that I'm using The problem is not only with For now, I guess I'll have to revert to this kind of ugly hack. EDIT: |
If I use
cabal2nix
to generate adefault.nix
for the current directory./.
, and I have adist
directory hanging around, that directory gets included in thesource
. This later leads to build errors becausenix
builds with the-split-objs
flag, but the GHC recompilation checker doesn't rebuild the.o
files because the source has not changed since they were last built. This later results in it not finding the split.o
files. While that could be considered a bug in GHC, it seems wrong to even include thedist
directory in the first place.It would be nice if
cabal2nix
automatically filtered some directories from the source usingfilterSource
:http://hackage.haskell.org/package/hspec-checkers-0.1.0/src/default.nix
Obvious choices would be
.git
,dist
, and_darcs
, etc, in the top-level of a project. Though in my personal projects I would also want to ignore_state
. So, it would be nice if there was something like a.cabal2nix
file where I could set my preferredboring
files.The text was updated successfully, but these errors were encountered: