haskell-cryptography / HsOpenSSL

OpenSSL binding for Haskell
http://hackage.haskell.org/package/HsOpenSSL
Creative Commons Zero v1.0 Universal
22 stars 33 forks source link

Improve suggestions when OpenSSL is not found #75

Closed Bodigrim closed 1 year ago

Bodigrim commented 1 year ago

https://github.com/haskell-cryptography/HsOpenSSL/blob/094f7ef6c9ef4dc3eea56802382b1d50c99572d6/Setup.hs#L90-L95

This advice works when you build HsOpenSSL itself, but does not when HsOpenSSL is only a dependency of the current package: --extra-include-dirs and --extra-lib-dirs are applied only to the current package. A more robust suggestion would be to extend cabal.project with

package HsOpenSSL
  extra-lib-dirs: ...
  extra-include-dirs: ...
vshabanov commented 1 year ago

Thank you for the idea. Fixed in HsOpenSSL-0.11.7.5

andreasabel commented 4 months ago

While maybe helpful for cabal users, this is lop-sided on the side of cabal vs. stack and causes

I think libraries should be agnostic whether one uses cabal or stack to build them.

vshabanov commented 4 months ago

I never used Stack, so I don't know what instructions for Stack might be (and whether is it possible to detect that Cabal is run from stack). I will happily accept a PR that extends the message with instructions for Stack.