1 { lib, stdenv, fetchurl, blas, lapack } :
3 stdenv.mkDerivation rec {
8 url = "http://www.ergoscf.org/source/tarfiles/ergo-${version}.tar.gz";
9 sha256 = "sha256-U0NVREEZ8HI0Q0ZcbwvZsYA76PWMh7bqgDG1uaUc01c=";
12 buildInputs = [ blas lapack ];
14 patches = [ ./math-constants.patch ];
21 "--enable-linalgebra-templates"
22 "--enable-performance"
23 ] ++ lib.optional stdenv.isx86_64 "--enable-sse-intrinsics";
25 LDFLAGS = "-lblas -llapack";
27 enableParallelBuilding = true;
29 OMP_NUM_THREADS = 2; # required for check phase
31 # With "fortify3", there are test failures, such as:
32 # Testing cnof CAMB3LYP/6-31G using FMM
33 # *** buffer overflow detected ***: terminated
34 # ./test_fmm_camb3lyp.sh: line 81: 1061289 Aborted (core dumped) ./ergo <<EOINPUT > /dev/null
35 hardeningDisable = [ "fortify3" ];
40 description = "Quantum chemistry program for large-scale self-consistent field calculations";
41 homepage = "http://www.ergoscf.org";
42 license = licenses.gpl3Plus;
43 maintainers = [ maintainers.markuskowa ];
44 platforms = platforms.linux;