6dba41fbcb
Use the attribute mpi to provide a system wide default MPI implementation. The default is openmpi (as before). This now allows for overriding the MPI implentation by using the overlay mechanism. Build all packages with mpich instead of the default openmpi can now be achived like this: self: super: { mpi = super.mpich; } All derivations that have been using "mpi ? null" to provide optional building with MPI have been change in the following way to allow for optional builds with MPI: { ... , mpi , useMpi ? false }
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl
|
|
, gfortran, fftw, blas, lapack
|
|
, useMpi ? false
|
|
, mpi
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "6.6";
|
|
pname = "quantum-espresso";
|
|
|
|
src = fetchurl {
|
|
url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
|
|
sha256 = "0b3718bwdqfyssyz25jknijar79qh5cf1bbizv9faliz135mcilj";
|
|
};
|
|
|
|
passthru = {
|
|
inherit mpi;
|
|
};
|
|
|
|
preConfigure = ''
|
|
patchShebangs configure
|
|
'';
|
|
|
|
buildInputs = [ fftw blas lapack gfortran ]
|
|
++ (lib.optionals useMpi [ mpi ]);
|
|
|
|
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
|
|
|
|
makeFlags = [ "all" ];
|
|
|
|
meta = with lib; {
|
|
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 ];
|
|
};
|
|
}
|