2012-02-22 23:41:27 +01:00
|
|
|
{ stdenv, fetchurl, gfortran, atlas, cmake, python }:
|
2008-10-05 11:01:59 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2012-02-21 22:43:44 +01:00
|
|
|
name = "liblapack-3.4.0";
|
2008-10-05 11:01:59 +02:00
|
|
|
src = fetchurl {
|
2012-02-21 22:43:44 +01:00
|
|
|
url = "http://www.netlib.org/lapack/lapack-3.4.0.tgz";
|
|
|
|
sha256 = "1sf30v1ps5icg67dvw5sbx5yhypx13am470gqg2f7l04f3wrw4x7";
|
2008-10-05 11:01:59 +02:00
|
|
|
};
|
|
|
|
|
2012-02-21 22:43:44 +01:00
|
|
|
propagatedBuildInputs = [ atlas ];
|
|
|
|
buildInputs = [ gfortran cmake ];
|
2012-02-22 23:41:27 +01:00
|
|
|
buildNativeInputs = [ python ];
|
2010-01-26 15:53:13 +01:00
|
|
|
|
2012-02-21 22:43:44 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_OPTIMIZED_BLAS=ON"
|
|
|
|
"-DBLAS_ATLAS_f77blas_LIBRARY=${atlas}/lib/libf77blas.a"
|
|
|
|
"-DBLAS_ATLAS_atlas_LIBRARY=${atlas}/lib/libatlas.a"
|
|
|
|
"-DCMAKE_Fortran_FLAGS=-fPIC"
|
|
|
|
];
|
2008-10-05 11:01:59 +02:00
|
|
|
|
2012-02-22 23:41:27 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = "
|
|
|
|
sed -i 's,^#!.*,#!${python}/bin/python,' lapack_testing.py
|
|
|
|
ctest
|
|
|
|
";
|
|
|
|
|
2012-02-21 22:43:44 +01:00
|
|
|
enableParallelBuilding = true;
|
2010-01-26 15:53:13 +01:00
|
|
|
|
2012-02-22 23:41:27 +01:00
|
|
|
passthru = {
|
|
|
|
blas = atlas;
|
|
|
|
};
|
|
|
|
|
2008-10-05 11:01:59 +02:00
|
|
|
meta = {
|
2010-01-26 15:53:13 +01:00
|
|
|
description = "Linear Algebra PACKage";
|
2010-01-26 20:28:09 +01:00
|
|
|
license = "revised-BSD";
|
2010-01-26 15:53:13 +01:00
|
|
|
homepage = "http://www.netlib.org/lapack/";
|
2008-10-05 11:01:59 +02:00
|
|
|
};
|
|
|
|
}
|