nixpkgs/pkgs/development/libraries/science/math/liblapack/default.nix

43 lines
891 B
Nix
Raw Normal View History

{
stdenv,
fetchurl,
gfortran,
cmake,
2016-10-18 08:10:42 +00:00
python2,
shared ? false
}:
let
usedLibExtension = if shared then ".so" else ".a";
inherit (stdenv.lib) optional optionals;
2018-05-06 19:09:56 +00:00
version = "3.8.0";
in
stdenv.mkDerivation rec {
name = "liblapack-${version}";
src = fetchurl {
2018-05-06 19:09:56 +00:00
url = "http://www.netlib.org/lapack/lapack-${version}.tar.gz";
sha256 = "1xmwi2mqmipvg950gb0rhgprcps8gy8sjm8ic9rgy2qjlv22rcny";
};
buildInputs = [ gfortran cmake ];
2016-10-18 08:10:42 +00:00
nativeBuildInputs = [ python2 ];
cmakeFlags = [
"-DUSE_OPTIMIZED_BLAS=ON"
"-DCMAKE_Fortran_FLAGS=-fPIC"
]
++ (optional shared "-DBUILD_SHARED_LIBS=ON");
doCheck = ! shared;
enableParallelBuilding = true;
meta = with stdenv.lib; {
inherit version;
description = "Linear Algebra PACKage";
homepage = http://www.netlib.org/lapack/;
license = licenses.bsd3;
platforms = platforms.all;
};
}