4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl
|
|
, gfortran, fftw, blas, lapack
|
|
, mpi ? null
|
|
}:
|
|
|
|
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 ]
|
|
++ (stdenv.lib.optionals (mpi != null) [ mpi ]);
|
|
|
|
configureFlags = if (mpi != null) 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 ];
|
|
};
|
|
}
|