summary refs log tree commit diff
path: root/pkgs/development/libraries/qrupdate/default.nix
blob: 465ec7eebb2b3383ef203b20db5a98cb126eca7a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ stdenv
, fetchurl
, gfortran
, liblapack
}:
stdenv.mkDerivation {
  name = "qrupdate-1.1.2";
  src = fetchurl {
    url = mirror://sourceforge/qrupdate/qrupdate-1.1.2.tar.gz ;
    sha256 = "024f601685phcm1pg8lhif3lpy5j9j0k6n0r46743g4fvh8wg8g2";  			
  };
  
  configurePhase = ''
    export PREFIX=$out
    sed -i -e 's,^BLAS=.*,BLAS=-L${liblapack}/lib -L${liblapack.blas} -lcblas -lf77blas -latlas,' \
      -e 's,^LAPACK=.*,LAPACK=-L${liblapack}/lib -llapack -lcblas -lf77blas -latlas,' \
      Makeconf
  '';

  doCheck = true;

  checkTarget = "test";

  buildTarget = "lib";

  installTarget = "install-staticlib";
  
  buildInputs = [ gfortran liblapack ];
}