···11{ stdenv, fetchurl, gfortran, tolerateCpuTimingInaccuracy ? true, shared ? false }:
2233let
44+ version = "3.10.1";
55+46 optionalString = stdenv.lib.optionalString;
77+ optional = stdenv.lib.optional;
58in
69710stdenv.mkDerivation {
88- name = "atlas-3.9.67";
1111+ name = "atlas-${version}";
9121013 src = fetchurl {
1111- url = mirror://sourceforge/math-atlas/atlas3.9.67.tar.bz2;
1212- sha256 = "06xxlv440z8a3qmfrh17p28girv71c6awvpw5vhpspr0pcsgk1pa";
1414+ url = "mirror://sourceforge/math-atlas/atlas${version}.tar.bz2";
1515+ sha256 = "11ncgdc7kzb2y2gqb3sgarm5saj9fr07r3h2yh2h5bja429b85d2";
1316 };
14171818+ # Atlas aborts the build if it detects that some kind of CPU frequency
1919+ # scaling is active on the build machine because that feature offsets the
2020+ # performance timings. We ignore that check, however, because with binaries
2121+ # being pre-built on Hydra those timings aren't accurate for the local
2222+ # machine in the first place.
2323+ patches = optional tolerateCpuTimingInaccuracy ./disable-timing-accuracy-check.patch;
2424+1525 # Configure outside of the source directory.
1626 preConfigure = '' mkdir build; cd build; configureScript=../configure; '';
17271828 # * -fPIC allows to build atlas inside shared objects, as octave does.
1929 #
2020- # * Atlas aborts the build if it detects that some kind of CPU frequency
2121- # scaling is active on the build machine because that feature offsets the
2222- # performance timings. We ignore that check, however, because with binaries
2323- # being pre-built on Hydra those timings aren't accurate for the local
2424- # machine in the first place.
2530 # * Atlas detects the cpu and does some tricks. For example, notices the
2631 # hydra AMD Family 10h computer, and uses a SSE trick for it (bit 17 of MXCSR)
2732 # available, for what I know, only in that family. So we hardcode K7
···3338 configureFlags = "-Fa alg -fPIC -t 0"
3439 + optionalString stdenv.isi686 " -b 32 -A 18 -V 1"
3540 + optionalString stdenv.isx86_64 " -A 31 -V 192"
3636- + optionalString tolerateCpuTimingInaccuracy " -Si cputhrchk 0"
3741 + optionalString shared " --shared "
3842 ;
3943