depot/third_party/nixpkgs/pkgs/applications/science/chemistry/quantum-espresso/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

43 lines
1.2 KiB
Nix

{ stdenv, fetchurl
, gfortran, fftw, blas, lapack
, mpi ? null
}:
stdenv.mkDerivation rec {
version = "6.5";
pname = "quantum-espresso";
src = fetchurl {
url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
sha256 = "00nnsq1vq579xsmkvwrgs6bdqdcbdlsmcp4yfynnvs40ca52m2r5";
};
passthru = {
inherit mpi;
};
preConfigure = ''
patchShebangs configure
'';
buildInputs = [ fftw blas lapack gfortran ]
++ (stdenv.lib.optionals (mpi != null) [ mpi ]);
configureFlags = if (mpi != null) then [ "LD=${mpi}/bin/mpif90" ] else [ "LD=${gfortran}/bin/gfortran" ];
makeFlags = [ "all" ];
meta = with stdenv.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 ];
};
}