2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2020-04-24 23:36:52 +00:00
|
|
|
, gfortran, fftw, blas, lapack
|
|
|
|
, mpi ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-05 17:05:55 +00:00
|
|
|
version = "6.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "quantum-espresso";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
|
2021-01-05 17:05:55 +00:00
|
|
|
sha256 = "0b3718bwdqfyssyz25jknijar79qh5cf1bbizv9faliz135mcilj";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit mpi;
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ fftw blas lapack gfortran ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ (lib.optionals (mpi != null) [ mpi ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
|
|
|
|
|
|
|
|
makeFlags = [ "all" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Electronic-structure calculations and materials modeling at the nanoscale";
|
|
|
|
longDescription = ''
|
|
|
|
Quantum ESPRESSO is an integrated suite of Open-Source computer codes for
|
|
|
|
electronic-structure calculations and materials modeling at the
|
|
|
|
nanoscale. It is based on density-functional theory, plane waves, and
|
|
|
|
pseudopotentials.
|
|
|
|
'';
|
|
|
|
homepage = "https://www.quantum-espresso.org/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|