nixpkgs/pkgs/applications/science/chemistry/octopus/default.nix
Matthew Bauer 1c8aba8334 treewide: use blas and lapack
This makes packages use lapack and blas, which can wrap different
BLAS/LAPACK implementations.

treewide: cleanup from blas/lapack changes

A few issues in the original treewide:

- can’t assume blas64 is a bool
- unused commented code
2020-04-17 16:24:09 -05:00

51 lines
1.2 KiB
Nix

{ stdenv, fetchFromGitLab, symlinkJoin, gfortran, perl, procps
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
}:
assert (!blas.is64bit) && (!lapack.is64bit);
stdenv.mkDerivation rec {
pname = "octopus";
version = "9.2";
src = fetchFromGitLab {
owner = "octopus-code";
repo = "octopus";
rev = version;
sha256 = "083z51sjv70asr04rv53wb9gf4396nblq1zl22qw7jdr28hji4is";
};
nativeBuildInputs = [ perl procps autoreconfHook ];
buildInputs = [ libyaml gfortran libxc blas lapack gsl fftw netcdf arpack ];
configureFlags = [
"--with-yaml-prefix=${libyaml}"
"--with-blas=-lblas"
"--with-lapack=-llapack"
"--with-fftw-prefix=${fftw.dev}"
"--with-gsl-prefix=${gsl}"
"--with-libxc-prefix=${libxc}"
];
doCheck = false;
checkTarget = "check-short";
postPatch = ''
patchShebangs ./
'';
postConfigure = ''
patchShebangs testsuite/oct-run_testsuite.sh
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Real-space time dependent density-functional theory code";
homepage = "https://octopus-code.org";
maintainers = with maintainers; [ markuskowa ];
license = licenses.gpl2;
platforms = [ "x86_64-linux" ];
};
}