nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl
, gfortran, fftw, blas, lapack
, useMpi ? false
, mpi
2018-09-11 20:41:17 +00:00
}:
stdenv.mkDerivation rec {
2020-12-19 20:14:40 +00:00
version = "6.6";
pname = "quantum-espresso";
2018-09-11 20:41:17 +00:00
src = fetchurl {
url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
2020-12-19 20:14:40 +00:00
sha256 = "0b3718bwdqfyssyz25jknijar79qh5cf1bbizv9faliz135mcilj";
2018-09-11 20:41:17 +00:00
};
passthru = {
inherit mpi;
};
preConfigure = ''
patchShebangs configure
'';
buildInputs = [ fftw blas lapack gfortran ]
++ (lib.optionals useMpi [ mpi ]);
2018-09-11 20:41:17 +00:00
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
2018-09-11 20:41:17 +00:00
makeFlags = [ "all" ];
meta = with lib; {
2018-09-11 20:41:17 +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.
'';
2020-02-24 19:40:14 +00:00
homepage = "https://www.quantum-espresso.org/";
2018-09-11 20:41:17 +00:00
license = licenses.gpl2;
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.costrouc ];
};
}