2010-01-26 15:53:08 +01:00
|
|
|
{ stdenv, fetchurl, gfortran }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "blas-20070405";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.netlib.org/blas/blas.tgz";
|
|
|
|
sha256 = "07alzd2yxkah96vjczqwi3ld5w00bvqv7qxb2fayvhs1h64jabxw";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [gfortran];
|
|
|
|
|
|
|
|
configurePhase = ''
|
2010-01-29 01:17:59 +01:00
|
|
|
echo >make.inc "SHELL = ${stdenv.shell}"
|
2010-01-26 15:53:08 +01:00
|
|
|
echo >>make.inc "PLAT = _LINUX"
|
|
|
|
echo >>make.inc "FORTRAN = gfortran"
|
|
|
|
echo >>make.inc "OPTS = -O2 -fPIC"
|
|
|
|
echo >>make.inc "DRVOPTS = $$(OPTS)"
|
|
|
|
echo >>make.inc "NOOPT = -O0 -fPIC"
|
|
|
|
echo >>make.inc "LOADER = gfortran"
|
|
|
|
echo >>make.inc "LOADOPTS ="
|
|
|
|
echo >>make.inc "ARCH = gfortran"
|
|
|
|
echo >>make.inc "ARCHFLAGS = -shared -o"
|
|
|
|
echo >>make.inc "RANLIB = echo"
|
|
|
|
echo >>make.inc "BLASLIB = libblas.so.3.0.3"
|
|
|
|
'';
|
|
|
|
|
2010-07-09 15:15:56 +02:00
|
|
|
buildPhase = ''
|
|
|
|
make
|
|
|
|
echo >>make.inc "ARCHFLAGS = "
|
|
|
|
echo >>make.inc "BLASLIB = libblas.a"
|
|
|
|
echo >>make.inc "ARCH = ar rcs"
|
|
|
|
echo >>make.inc "RANLIB = ranlib"
|
|
|
|
make
|
|
|
|
'';
|
|
|
|
|
2010-01-26 15:53:08 +01:00
|
|
|
installPhase = ''
|
2010-07-09 15:15:56 +02:00
|
|
|
install -D -m755 libblas.a "$out/lib/libblas.a"
|
2010-01-26 15:53:08 +01:00
|
|
|
install -D -m755 libblas.so.3.0.3 "$out/lib/libblas.so.3.0.3"
|
|
|
|
ln -s libblas.so.3.0.3 "$out/lib/libblas.so.3"
|
|
|
|
ln -s libblas.so.3.0.3 "$out/lib/libblas.so"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Basic Linear Algebra Subprograms";
|
2010-01-26 20:28:03 +01:00
|
|
|
license = "public domain";
|
2010-01-26 15:53:08 +01:00
|
|
|
homepage = "http://www.netlib.org/blas/";
|
|
|
|
};
|
|
|
|
}
|