git.iko.soy/typeable/nixpkgs
on master help sign in
atlas: optionally build with full lapack
3ce76d4Thomas Tuegel
pkgs/development/libraries/science/math/atlas/default.nix+8−4
@@ -2,6 +2,7 @@
2, cpuConfig ? if stdenv.isi686 then "-b 32 -A 12 -V 1" else "-b 64 -A 14 -V 384"
2, cpuConfig ? if stdenv.isi686 then "-b 32 -A 12 -V 1" else "-b 64 -A 14 -V 384"
3, cacheEdge ? "262144"
3, cacheEdge ? "262144"
4, threads ? "0"
4, threads ? "0"
5+, liblapack, withLapack
5}:
6}:
6
7
7# Atlas detects the CPU and optimizes its build accordingly. This is great when
8# Atlas detects the CPU and optimizes its build accordingly. This is great when
@@ -48,7 +49,7 @@ let
48in
49in
49
50
50stdenv.mkDerivation {
51stdenv.mkDerivation {
51− name = "atlas-${version}";
52+ name = "atlas-${version}" + optionalString withLapack "-with-lapack";
52
53
53 src = fetchurl {
54 src = fetchurl {
54 url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2";
55 url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2";
@@ -81,7 +82,8 @@ stdenv.mkDerivation {
81 "-fPIC"
82 "-fPIC"
82 "-t ${threads}"
83 "-t ${threads}"
83 cpuConfig
84 cpuConfig
84− ] ++ optional shared "--shared";
85+ ] ++ optional shared "--shared"
86+ ++ optional withLapack "--with-netlib-lapack-tarfile=${liblapack.src}";
85
87
86 postConfigure = ''
88 postConfigure = ''
87 if [[ -n "${cacheEdge}" ]]; then
89 if [[ -n "${cacheEdge}" ]]; then
@@ -94,8 +96,10 @@ stdenv.mkDerivation {
94
96
95 postInstall = ''
97 postInstall = ''
96 # Avoid name collision with the real lapack (ATLAS only builds a partial
98 # Avoid name collision with the real lapack (ATLAS only builds a partial
97− # lapack).
99+ # lapack unless withLapack = true).
100+ if ${if withLapack then "false" else "true"}; then
98− mv $out/lib/liblapack.a $out/lib/liblapack_atlas.a
101+ mv $out/lib/liblapack.a $out/lib/liblapack_atlas.a
102+ fi
99 '';
103 '';
100
104
101 meta = {
105 meta = {
pkgs/top-level/all-packages.nix+4
@@ -12174,8 +12174,12 @@ let
12174 # great feature, but it's of limited use with pre-built binaries
12174 # great feature, but it's of limited use with pre-built binaries
12175 # coming from a central build farm.
12175 # coming from a central build farm.
12176 tolerateCpuTimingInaccuracy = true;
12176 tolerateCpuTimingInaccuracy = true;
12177+ liblapack = liblapack_3_5_0;
12178+ withLapack = false;
12177 };
12179 };
12178
12180
12181+ atlasWithLapack = atlas.override { withLapack = true; };
12182+
12179 blas = callPackage ../development/libraries/science/math/blas { };
12183 blas = callPackage ../development/libraries/science/math/blas { };
12180
12184
12181 content = builderDefsPackage ../applications/science/math/content {
12185 content = builderDefsPackage ../applications/science/math/content {