nixpkgs/pkgs/by-name/li/libvdwxc/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

53 lines
1.1 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 ];
};
}