https://github.com/NixOS/nixpkgs/pull/67629

Dominic Steinitz
dominic@steinitz.org
http://idontgetoutmuch.org
Twitter: @idontgetoutmuch




On 28 Aug 2019, at 15:17, Henning Thielemann <lemming@henning-thielemann.de> wrote:


On Wed, 28 Aug 2019, dominic@steinitz.org wrote:

I thought I would broaden out the discussion Henning and I have been having.
I have managed to get http://hackage.haskell.org/package/blas-ffi to build under nix. Ideally we would like
cabal2nix to do this automatically for us. We can do this if

1. We use openblas rather than blas.

I suggest this anyway.

2. Replace `PkgConfig-Depends: blas` with `PkgConfig-Depends: lapack (as the lapack derivation in nix generates
   a blas.pc) in the cabal file.

This sounds like a hack. blas-ffi depends only on the BLAS library and thus should need blas.pc only. OpenBLAS has its own blas.pc and otherwise plain BLAS library should provide blas.pc. In Debian you can even install both of them and select between them using Debian's alternatives system.

3. Fix nix to generate .pc files for blas - I don’t know the consequences of doing this but I can’t see any
   downside.

This should be the right way.