nixpkgs/pkgs/by-name/li/libvdwxc/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

63 lines
1.2 KiB
Nix

{
stdenv,
lib,
fetchFromGitLab,
gfortran,
autoreconfHook,
fftwMpi,
mpi,
}:
stdenv.mkDerivation rec {
pname = "libvdwxc";
# Stable version has non-working MPI detection.
version = "unstable-24.02.2020";
src = fetchFromGitLab {
owner = "libvdwxc";
repo = pname;
rev = "92f4910c6ac88e111db2fb3a518089d0510c53b0";
sha256 = "1c7pjrvifncbdyngs2bv185imxbcbq64nka8gshhp8n2ns6fids6";
};
nativeBuildInputs = [
autoreconfHook
gfortran
];
buildInputs = [
mpi
fftwMpi
];
preConfigure = ''
mkdir build && cd build
export PATH=$PATH:${mpi}/bin
configureFlagsArray+=(
--with-mpi=${lib.getDev mpi}
CC=mpicc
FC=mpif90
MPICC=mpicc
MPIFC=mpif90
)
'';
configureScript = "../configure";
hardeningDisable = [ "format" ];
doCheck = true;
meta = with lib; {
description = "Portable C library of density functionals with van der Waals interactions for density functional theory";
license = with licenses; [
lgpl3Plus
bsd3
];
homepage = "https://libvdwxc.org/";
platforms = platforms.unix;
maintainers = [ maintainers.sheepforce ];
};
}