tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
openblas_2_14: init at 0.2.14
Frederik Rietdijk
10 years ago
3e476a73
63cf61e8
+67
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
science
math
openblas
0.2.14.nix
top-level
all-packages.nix
+65
pkgs/development/libraries/science/math/openblas/0.2.14.nix
···
1
1
+
{ stdenv, fetchurl, gfortran, perl, which, config, coreutils
2
2
+
# Most packages depending on openblas expect integer width to match pointer width,
3
3
+
# but some expect to use 32-bit integers always (for compatibility with reference BLAS).
4
4
+
, blas64 ? null
5
5
+
}:
6
6
+
7
7
+
with stdenv.lib;
8
8
+
9
9
+
let blas64_ = blas64; in
10
10
+
11
11
+
let local = config.openblas.preferLocalBuild or false;
12
12
+
binary =
13
13
+
{ i686-linux = "32";
14
14
+
x86_64-linux = "64";
15
15
+
x86_64-darwin = "64";
16
16
+
}."${stdenv.system}" or (throw "unsupported system: ${stdenv.system}");
17
17
+
genericFlags =
18
18
+
[ "DYNAMIC_ARCH=1"
19
19
+
"NUM_THREADS=64"
20
20
+
];
21
21
+
localFlags = config.openblas.flags or
22
22
+
optionals (hasAttr "target" config.openblas) [ "TARGET=${config.openblas.target}" ];
23
23
+
blas64 = if blas64_ != null then blas64_ else hasPrefix "x86_64" stdenv.system;
24
24
+
25
25
+
version = "0.2.14";
26
26
+
in
27
27
+
stdenv.mkDerivation {
28
28
+
name = "openblas-${version}";
29
29
+
src = fetchurl {
30
30
+
url = "https://github.com/xianyi/OpenBLAS/archive/v${version}.tar.gz";
31
31
+
sha256 = "2411c4f56f477b42dff54db2b7ffc0b7cf53bb9778d54982595c64cc69c40fc1";
32
32
+
name = "openblas-${version}.tar.gz";
33
33
+
};
34
34
+
35
35
+
inherit blas64;
36
36
+
37
37
+
nativeBuildInputs = optionals stdenv.isDarwin [coreutils] ++ [gfortran perl which];
38
38
+
39
39
+
makeFlags =
40
40
+
(if local then localFlags else genericFlags)
41
41
+
++
42
42
+
optionals stdenv.isDarwin ["MACOSX_DEPLOYMENT_TARGET=10.9"]
43
43
+
++
44
44
+
[
45
45
+
"FC=gfortran"
46
46
+
# Note that clang is available through the stdenv on OSX and
47
47
+
# thus is not an explicit dependency.
48
48
+
"CC=${if stdenv.isDarwin then "clang" else "gcc"}"
49
49
+
''PREFIX="''$(out)"''
50
50
+
"BINARY=${binary}"
51
51
+
"USE_OPENMP=${if stdenv.isDarwin then "0" else "1"}"
52
52
+
"INTERFACE64=${if blas64 then "1" else "0"}"
53
53
+
];
54
54
+
55
55
+
doCheck = true;
56
56
+
checkTarget = "tests";
57
57
+
58
58
+
meta = with stdenv.lib; {
59
59
+
description = "Basic Linear Algebra Subprograms";
60
60
+
license = licenses.bsd3;
61
61
+
homepage = "https://github.com/xianyi/OpenBLAS";
62
62
+
platforms = platforms.unix;
63
63
+
maintainers = with maintainers; [ ttuegel ];
64
64
+
};
65
65
+
}
+2
pkgs/top-level/all-packages.nix
···
15029
15029
liblbfgs = callPackage ../development/libraries/science/math/liblbfgs { };
15030
15030
15031
15031
openblas = callPackage ../development/libraries/science/math/openblas { };
15032
15032
+
openblas_2_14 = callPackage ../development/libraries/science/math/openblas/0.2.14.nix { };
15032
15033
15033
15034
# A version of OpenBLAS using 32-bit integers on all platforms for compatibility with
15034
15035
# standard BLAS and LAPACK.
15035
15036
openblasCompat = openblas.override { blas64 = false; };
15037
15037
+
openblasCompat_2_14 = openblas_2_14.override { blas64 = false; };
15036
15038
15037
15039
openlibm = callPackage ../development/libraries/science/math/openlibm {};
15038
15040