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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitLab
, gfortran
, fftw
, blas
, lapack
, useMpi ? false
, mpi
2018-09-11 22:41:17 +02:00
}:
stdenv.mkDerivation rec {
2020-12-19 21:14:40 +01:00
version = "6.6";
pname = "quantum-espresso";
2018-09-11 22:41:17 +02:00
src = fetchFromGitLab {
owner = "QEF";
repo = "q-e";
rev = "qe-${version}";
sha256 = "1mkfmw0fq1dabplzdn6v1abhw0ds55gzlvbx3a9brv493whk21yp";
2018-09-11 22:41:17 +02:00
};
passthru = {
inherit mpi;
};
preConfigure = ''
patchShebangs configure
'';
nativeBuildInputs = [ gfortran ];
buildInputs = [ fftw blas lapack ]
++ (lib.optionals useMpi [ mpi ]);
2018-09-11 22:41:17 +02:00
configureFlags = if useMpi then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
2018-09-11 22:41:17 +02:00
makeFlags = [ "all" ];
meta = with lib; {
2018-09-11 22:41:17 +02: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 20:40:14 +01:00
homepage = "https://www.quantum-espresso.org/";
2018-09-11 22:41:17 +02:00
license = licenses.gpl2;
2021-03-04 04:40:47 +01:00
platforms = [ "x86_64-linux" "x86_64-darwin" ];
2018-09-11 22:41:17 +02:00
maintainers = [ maintainers.costrouc ];
};
}