-
Notifications
You must be signed in to change notification settings - Fork 199
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
Binaries using hlint have hlint_datadir hardcoded to build directory, not destroot #699
Comments
I think this is a cabal/stack thing. When configuring cabal, you pass |
It looks like Cabal has a |
I see that there’s a (four year old!) upstream request for a I don’t see a Any suggestions on the correct build calls for |
I think you want |
Thanks again! It's all working now. See macports/macports-ports#4706 I'll defer to you if you want to close this issue. I was able to work around it with a lot of hackery, but both upstream |
Can you share your hackery? Is this something HLint should have made easier, or could make easier? Or is this just Cabal and Stack being hard to wrangle? |
The hackery is in the Portfile in the PR linked above: https://github.com/macports/macports-ports/pull/4706/files#diff-039a3b878c0a62a118725172573632f4 It’s basically: create symlinks in This won’t necessarily work for packages that want to do things like To the best of my knowledge (which isn’t too much), this is a compiler-level issue (ghc or cabal or stack, in that order) in Haskell world, and not necessarily an application-level issue. |
An added benefit for
|
This has come full circle back to you from an older blog post. The bottom line is that Cabal is being hard to wrangle. Before I get to the issue, please let me recap the background:
Now that we have a working fix to Would you please help figuring out an Your approach described by solves the issue of hardcoded This works for the
Nothing is working. Would you be able to give this a try and let me know what you think the issue is? I've also unsuccessfully played around with Current build recipe:
Here's a
|
I think Cabal deliberately defeats you here, by picking its autogen over yours. I suspect you'll have to go to the Cabal people for help - I'm afraid I'm out of my depth. |
Thanks to #824 this is now fixed. |
I’m trying to port IHaskell to MacPorts. IHaskell uses
hlint
.The issue is that both
stack
andcabal
builds create binaries that point to the build directory in.stack
or.cabal-sandbox
, not the install directory with prefix, say,/opt/local/bin
. After the build, these temporary build directories are discarded, and neitherihaskell
norhlint
binaries work.I see that there is an
hlint --datadir
option:hlint/cc/Engine.hs
Lines 65 to 70 in c62b616
It seems like it should be straightforward, but I’m not sure how to build projects that use hlint to set its data directory to have prefix
/opt/local
so that destrooting the build will work.Any pointers would be appreciated.
Related:
stack install
not independent of .stack root, not destroot'd IHaskell/IHaskell#1061The text was updated successfully, but these errors were encountered: