returned to two-file structure for liblapack

This commit is contained in:
Allen Nelson
2015-05-28 21:49:06 -05:00
parent 2c125cf37a
commit e001340cf6
3 changed files with 73 additions and 17 deletions
@@ -5,8 +5,7 @@
cmake,
python,
atlas ? null,
shared ? false,
version ? "3.4.1"
shared ? false
}:
let
atlasMaybeShared = if atlas != null then atlas.override { inherit shared; }
@@ -14,25 +13,14 @@ let
usedLibExtension = if shared then ".so" else ".a";
inherit (stdenv.lib) optional optionals concatStringsSep;
inherit (builtins) hasAttr attrNames;
# Hashes of the versions of liblapack we know about.
versions2sha = {
"3.4.1" = "93b910f94f6091a2e71b59809c4db4a14655db527cfc5821ade2e8c8ab75380f";
"3.5.0" = "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s";
};
version = "3.4.1";
in
if !(builtins.hasAttr version versions2sha)
then throw ''
Unknown liblapack version ${version}.
Available versions: ${concatStringsSep ", " (attrNames versions2sha)}
''
else
stdenv.mkDerivation rec {
name = "liblapack-${version}";
src = fetchurl {
url = "http://www.netlib.org/lapack/lapack-${version}.tgz";
sha256 = versions2sha."${version}";
sha256 = "93b910f94f6091a2e71b59809c4db4a14655db527cfc5821ade2e8c8ab75380f";
};
propagatedBuildInputs = [ atlasMaybeShared ];