git.iko.soy/typeable/nixpkgs
on master help sign in
atlas: optionally build with full lapack
commit3ce76d4dd0a4482bb09420fb1e5aad814d57196a authorThomas Tuegel <ttuegel@gmail.com> dateMon 15 Dec 2014, 11:27 (12 years ago) parent91657e3
2 files changed+12−4
pkgs/development/libraries/science/math/atlas/default.nix+8−4 pkgs/top-level/all-packages.nix+4
pkgs/development/libraries/science/math/atlas/default.nix+8−4
@@ -2,6 +2,7 @@
22, cpuConfig ? if stdenv.isi686 then "-b 32 -A 12 -V 1" else "-b 64 -A 14 -V 384"
33, cacheEdge ? "262144"
44, threads ? "0"
5+, liblapack, withLapack
56}:
67
78# Atlas detects the CPU and optimizes its build accordingly. This is great when
@@ -48,7 +49,7 @@ let
4849in
4950
5051stdenv.mkDerivation {
51− name = "atlas-${version}";
52+ name = "atlas-${version}" + optionalString withLapack "-with-lapack";
5253
5354 src = fetchurl {
5455 url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2";
@@ -81,7 +82,8 @@ stdenv.mkDerivation {
8182 "-fPIC"
8283 "-t ${threads}"
8384 cpuConfig
84− ] ++ optional shared "--shared";
85+ ] ++ optional shared "--shared"
86+ ++ optional withLapack "--with-netlib-lapack-tarfile=${liblapack.src}";
8587
8688 postConfigure = ''
8789 if [[ -n "${cacheEdge}" ]]; then
@@ -94,8 +96,10 @@ stdenv.mkDerivation {
9496
9597 postInstall = ''
9698 # Avoid name collision with the real lapack (ATLAS only builds a partial
97− # lapack).
98− mv $out/lib/liblapack.a $out/lib/liblapack_atlas.a
99+ # lapack unless withLapack = true).
100+ if ${if withLapack then "false" else "true"}; then
101+ mv $out/lib/liblapack.a $out/lib/liblapack_atlas.a
102+ fi
99103 '';
100104
101105 meta = {
pkgs/top-level/all-packages.nix+4
@@ -12174,8 +12174,12 @@ let
1217412174 # great feature, but it's of limited use with pre-built binaries
1217512175 # coming from a central build farm.
1217612176 tolerateCpuTimingInaccuracy = true;
12177+ liblapack = liblapack_3_5_0;
12178+ withLapack = false;
1217712179 };
1217812180
12181+ atlasWithLapack = atlas.override { withLapack = true; };
12182+
1217912183 blas = callPackage ../development/libraries/science/math/blas { };
1218012184
1218112185 content = builderDefsPackage ../applications/science/math/content {