base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / li / libvdwxc / package.nix
blobc843d443e81e219048fe4cc930e6d4d38a856be7
1 { stdenv
2 , lib
3 , fetchFromGitLab
4 , gfortran
5 , autoreconfHook
6 , fftwMpi
7 , mpi
8 }:
10 stdenv.mkDerivation rec {
11   pname = "libvdwxc";
12   # Stable version has non-working MPI detection.
13   version = "unstable-24.02.2020";
15   src = fetchFromGitLab {
16     owner = "libvdwxc";
17     repo = pname;
18     rev = "92f4910c6ac88e111db2fb3a518089d0510c53b0";
19     sha256 = "1c7pjrvifncbdyngs2bv185imxbcbq64nka8gshhp8n2ns6fids6";
20   };
22   nativeBuildInputs = [ autoreconfHook gfortran ];
24   buildInputs = [ mpi fftwMpi ];
26   preConfigure = ''
27     mkdir build && cd build
29     export PATH=$PATH:${mpi}/bin
30     configureFlagsArray+=(
31       --with-mpi=${lib.getDev mpi}
32       CC=mpicc
33       FC=mpif90
34       MPICC=mpicc
35       MPIFC=mpif90
36     )
37   '';
39   configureScript = "../configure";
41   hardeningDisable = [ "format" ];
43   doCheck = true;
45   meta = with lib; {
46     description = "Portable C library of density functionals with van der Waals interactions for density functional theory";
47     license = with licenses; [ lgpl3Plus bsd3 ];
48     homepage = "https://libvdwxc.org/";
49     platforms = platforms.unix;
50     maintainers = [ maintainers.sheepforce ];
51   };