Merge pull request #40041 from timokau/liblapack-3.8.0

liblapack: 3.4.1 -> 3.8.0
This commit is contained in:
Michael Raskin 2018-05-07 06:27:54 +00:00 committed by GitHub
commit 903ae1ea14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 72 deletions

@ -1,64 +0,0 @@
{
stdenv,
fetchurl,
gfortran,
cmake,
python2,
atlas ? null,
shared ? false
}:
let
atlasMaybeShared = if atlas != null then atlas.override { inherit shared; }
else null;
usedLibExtension = if shared then ".so" else ".a";
inherit (stdenv.lib) optional optionals concatStringsSep;
inherit (builtins) hasAttr attrNames;
version = "3.5.0";
in
stdenv.mkDerivation rec {
name = "liblapack-${version}";
src = fetchurl {
url = "http://www.netlib.org/lapack/lapack-${version}.tgz";
sha256 = "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s";
};
propagatedBuildInputs = [ atlasMaybeShared ];
buildInputs = [ gfortran cmake ];
nativeBuildInputs = [ python2 ];
cmakeFlags = [
"-DUSE_OPTIMIZED_BLAS=ON"
"-DCMAKE_Fortran_FLAGS=-fPIC"
]
++ (optionals (atlas != null) [
"-DBLAS_ATLAS_f77blas_LIBRARY=${atlasMaybeShared}/lib/libf77blas${usedLibExtension}"
"-DBLAS_ATLAS_atlas_LIBRARY=${atlasMaybeShared}/lib/libatlas${usedLibExtension}"
])
++ (optional shared "-DBUILD_SHARED_LIBS=ON")
# If we're on darwin, CMake will automatically detect impure paths. This switch
# prevents that.
++ (optional stdenv.isDarwin "-DCMAKE_OSX_SYSROOT:PATH=''")
;
doCheck = ! shared;
checkPhase = "
sed -i 's,^#!.*,#!${python2.interpreter},' lapack_testing.py
ctest
";
enableParallelBuilding = true;
passthru = {
blas = atlas;
};
meta = with stdenv.lib; {
inherit version;
description = "Linear Algebra PACKage";
homepage = http://www.netlib.org/lapack/;
license = licenses.bsd3;
platforms = platforms.all;
};
}

@ -13,14 +13,14 @@ let
usedLibExtension = if shared then ".so" else ".a";
inherit (stdenv.lib) optional optionals concatStringsSep;
inherit (builtins) hasAttr attrNames;
version = "3.4.1";
version = "3.8.0";
in
stdenv.mkDerivation rec {
name = "liblapack-${version}";
src = fetchurl {
url = "http://www.netlib.org/lapack/lapack-${version}.tgz";
sha256 = "93b910f94f6091a2e71b59809c4db4a14655db527cfc5821ade2e8c8ab75380f";
url = "http://www.netlib.org/lapack/lapack-${version}.tar.gz";
sha256 = "1xmwi2mqmipvg950gb0rhgprcps8gy8sjm8ic9rgy2qjlv22rcny";
};
propagatedBuildInputs = [ atlasMaybeShared ];
@ -44,7 +44,6 @@ stdenv.mkDerivation rec {
doCheck = ! shared;
checkPhase = "
sed -i 's,^#!.*,#!${python2.interpreter},' lapack_testing.py
ctest
";

@ -19947,7 +19947,7 @@ with pkgs;
# great feature, but it's of limited use with pre-built binaries
# coming from a central build farm.
tolerateCpuTimingInaccuracy = true;
liblapack = liblapack_3_5_0WithoutAtlas;
liblapack = liblapackWithoutAtlas;
withLapack = false;
};
@ -19970,10 +19970,7 @@ with pkgs;
# without atlas. Etc.
liblapackWithAtlas = callPackage ../development/libraries/science/math/liblapack {};
liblapackWithoutAtlas = liblapackWithAtlas.override { atlas = null; };
liblapack_3_5_0WithAtlas = callPackage ../development/libraries/science/math/liblapack/3.5.0.nix {};
liblapack_3_5_0WithoutAtlas = liblapack_3_5_0WithAtlas.override { atlas = null; };
liblapack = liblapackWithAtlas;
liblapack_3_5_0 = liblapack_3_5_0WithAtlas;
liblbfgs = callPackage ../development/libraries/science/math/liblbfgs { };