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.
  2. Replace `PkgConfig-Depends: blas` with `PkgConfig-Depends: lapack (as the lapack derivation in nix generates a blas.pc) in the cabal file.
  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.

Does anyone have any views on what might be the best approach?

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

Begin forwarded message:

From: dominic@steinitz.org
Subject: Getting blas-ffi to build under nix
Date: 28 August 2019 at 13:31:45 BST
To: Henning Thielemann <lemming@henning-thielemann.de>

Hi Henning,

I think there are 3 options (in nix - they may not work elsewhere)

  1. Use openblas rather than blas
  2. Replace `PkgConfig-Depends: blas` with `PkgConfig-Depends: lapack`
  3. Fix nix to generate .pc files for blas (it does this for openblas and lapack, the latter also generates a blas.pc file

I don’t have a strong preference but I think I’d go for using openblas. I can send a patch but of course it’s a 1 line change so maybe you could just do it yourself and release a new version to hackage?

Dominic Steinitz
Twitter: @idontgetoutmuch