-
Notifications
You must be signed in to change notification settings - Fork 20
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
find the package database the same way ghc does #252
Comments
hawk makes heavy use of the hint library, and there is a hint issue explaining how to get hint working with nix. Does it help?
That's exactly what I used to do with the
That would work too. Would you like to contribute such an entry to the list of supported installation methods in
I certainly wouldn't want to require users to pass a |
@gelisam Yes absolutely, thanks. After reading that issue yesterday I managed to get everything working by following the scheme of passing env vars in my Nix derivation and getting hawk to read them. My changes are kind of hacked together but you can see them here if it's of any use: main...masaeedu:bypass_package_db_detection. I can't get to all the other points you brought up just now, but I'll circle back to this later. |
I stumbled upon this comment explaining how GHC_PACKAGE_PATH works. it looks like there is a special file which ghc looks for if that environment variable doesn't exist. by mimicking the way in which ghc looks for the package db, I think it should be possible to support every installation method without having to write special-case code for each. |
Hello. Thanks for your work on this handy tool. I've often been frustrated by awk and am looking forward to replacing it in my workflow with hawk.
I'm having a bit of a hard time getting set up to use this via Nix. The tool seems to be doing some sophisticated analysis in
System.Console.Hawk.PackageDbs
to find out the location of an appropriate package DB. It produces the following message when its efforts fail:One solution is to now teach the tool how the Nix infrastructure deals with its package database. But if the tool just asks for the package DB using an env var or command line flag, users can be responsible for teaching it where the package database is, and the tool doesn't need to try and pattern match over the open universe of possible ways to install a Haskell executable.
Would it make any sense to look for the
GHC_PACKAGE_PATH
env var and just bypass all the checks in that module if it's present? AFAICT that env var should then be picked up by theghc
API lib thathint
is using, so we don't need the extra-package-db
arg being computed here.An even more transparent solution would be to let the user pass through arbitrary GHC flags, including a package DB.
The text was updated successfully, but these errors were encountered: