mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
51 lines
1.2 KiB
Nix
51 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitLab, cmake, gfortran, perl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libxc";
|
|
version = "6.2.2";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "libxc";
|
|
repo = "libxc";
|
|
rev = version;
|
|
hash = "sha256-JYhuyW95I7Q0edLIe7H//+ej5vh6MdAGxXjmNxDMuhQ=";
|
|
};
|
|
|
|
# Timeout increase has already been included upstream in master.
|
|
# Check upon updates if this can be removed.
|
|
postPatch = ''
|
|
substituteInPlace testsuite/CMakeLists.txt \
|
|
--replace "PROPERTIES TIMEOUT 1" "PROPERTIES TIMEOUT 30"
|
|
'';
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
nativeBuildInputs = [ perl cmake gfortran ];
|
|
|
|
preConfigure = ''
|
|
patchShebangs ./
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DENABLE_FORTRAN=ON"
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
"-DENABLE_XHOST=OFF"
|
|
# Force compilation of higher derivatives
|
|
"-DDISABLE_VXC=0"
|
|
"-DDISABLE_FXC=0"
|
|
"-DDISABLE_KXC=0"
|
|
"-DDISABLE_LXC=0"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "Library of exchange-correlation functionals for density-functional theory";
|
|
mainProgram = "xc-info";
|
|
homepage = "https://www.tddft.org/programs/Libxc/";
|
|
license = licenses.mpl20;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ markuskowa ];
|
|
};
|
|
}
|