hawk
hawk copied to clipboard
Windows support
Hawk used to work on Windows, but it does not anymore. I do not currently plan to add Windows support, but this issue exists to point you in the right direction if you want to do it yourself. By the way, I really enjoy pair programming on open source projects, so if you do want to volunteer, don't be afraid to reach out!
The main thing which is currently preventing hawk from running on Windows is the installation-method detection code in src/System/Console/Hawk/PackageDbs.hs
. The hawk executable needs to know where the haskell-awk library has been installed in order to access the hawk runtime, and also to allow the user expression to use libraries (currently, hawk expressions have access to all the libraries which have been installed in the same package-db as the hawk runtime).
By "where", I mean "which package-db path must I pass to ghc". Different installation methods, such as cabal v1-install
, cabal v1-sandbox
, cabal v2-install
, cabal v2-run
, and stack
, each have their own idiosyncrasies about where they install their executables and where they install their libraries. So hawk tries to detect which installation method has been used, typically by looking at the executable's installation path (e.g. ~/.cabal/bin
is cabal
, ~/.local/bin
is stack
), and then manipulates that path in order to find the package-db path(s). I tried to be careful not to assume forward slashes in computation involving paths, but evidently that was not sufficient. Maybe cabal
doesn't install executables in a folder named .cabal\bin
on Windows?