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

Declare pkg-config dependencies #42

Closed osa1 closed 4 years ago

vshabanov commented 5 years ago

It fails Travis CI (for some reason Cabal 2.5 can't parse output of pkg-config --modversion) and not all systems have pkg-config so it's necessary to take it into account somehow.

Do you really need pkg-config? HsOpenSSL has a lot of options for various platforms and even tries autodetect OpenSSL installation path on macOS.

osa1 commented 5 years ago

Thanks for the quick response.

I have no idea if I absolutely need this, but this was needed to make this package buildable on NixOS. Maybe @bgamari can provide more info on this as he suggested me adding this field.

osa1 commented 5 years ago

Just confirmed with @phadej that the pkg-config --modversions parsing problem is a Cabal bug and it now fixed in https://github.com/haskell/cabal/issues/163 .

It'll take some time for that change to be shipped though.

vshabanov commented 5 years ago

Great. It seems that following scheme is used in tests related to fix:

Flag use-pkg-config
    default: False
    manual:  True
...
Library
    ...
    if flag(use-pkg-config)
        pkgconfig-depends: ...
    else
        ...

Perhaps it worth to adopt it so HsOpenSSL could be used on all systems with or without pkg-config

vshabanov commented 4 years ago

Closing this PR, since #51 was merged.