2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
, gfortran
|
|
|
|
, fftw
|
|
|
|
, blas
|
|
|
|
, lapack
|
2021-02-05 17:12:51 +00:00
|
|
|
, useMpi ? false
|
|
|
|
, mpi
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
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";
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "QEF";
|
|
|
|
repo = "q-e";
|
|
|
|
rev = "qe-${version}";
|
|
|
|
sha256 = "1mkfmw0fq1dabplzdn6v1abhw0ds55gzlvbx3a9brv493whk21yp";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit mpi;
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ fftw blas lapack gfortran ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ (lib.optionals useMpi [ mpi ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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 = ''
|
2021-09-18 10:52:07 +00:00
|
|
|
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.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.quantum-espresso.org/";
|
|
|
|
license = licenses.gpl2;
|
2021-03-09 03:18:52 +00:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|