nixpkgs/pkgs/development/libraries/qrupdate/default.nix
Anthony Cowley 028e3d82df qrupdate: fix installation (darwin)
The issue is that the library files were not copied to $out with the
existing `installTargets` definition.

I noticed this problem on darwin, but I do not know if it is a
darwin-only problem.
2016-07-18 13:48:31 -04:00

37 lines
847 B
Nix

{ stdenv
, fetchurl
, gfortran
, openblas
}:
stdenv.mkDerivation {
name = "qrupdate-1.1.2";
src = fetchurl {
url = mirror://sourceforge/qrupdate/qrupdate-1.1.2.tar.gz ;
sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2";
};
configurePhase =
''
export PREFIX=$out
sed -i -e 's,^BLAS=.*,BLAS=-L${openblas}/lib -lopenblas,' \
-e 's,^LAPACK=.*,LAPACK=-L${openblas}/lib -lopenblas,' \
Makeconf
''
+ stdenv.lib.optionalString openblas.blas64
''
sed -i Makeconf -e '/^FFLAGS=.*/ s/$/-fdefault-integer-8/'
'';
doCheck = true;
checkTarget = "test";
buildFlags = [ "lib" "solib" ];
installTargets = if stdenv.isDarwin
then ["install-staticlib" "install-shlib"]
else "install";
buildInputs = [ gfortran openblas ];
}