blob: 829e82b7494a0fbf07af4178320460e56a8268ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ stdenv, fetchurl
, gfortran, fftw, openblas
, mpi ? null
}:
stdenv.mkDerivation rec {
version = "6.4";
name = "quantum-espresso-${version}";
src = fetchurl {
url = "https://gitlab.com/QEF/q-e/-/archive/qe-${version}/q-e-qe-${version}.tar.gz";
sha256 = "1zjblzf0xzwmhmpjm56xvv8wsv5jmp5a204irzyicmd77p86c4vq";
};
passthru = {
inherit mpi;
};
preConfigure = ''
patchShebangs configure
'';
# remove after 6.4 version:
# makefile needs to ignore install directory easier than applying patch
preInstall = ''
printf "\n.PHONY: install\n" >> Makefile
'';
buildInputs = [ fftw openblas 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 ];
};
}
|