1{ lib, stdenv, fetchFromGitHub, cmake, perl, gfortran, python3
2, boost, eigen, zlib
3} :
4
5stdenv.mkDerivation rec {
6 pname = "pcmsolver";
7 version = "1.3.0";
8
9 src = fetchFromGitHub {
10 owner = "PCMSolver";
11 repo = pname;
12 rev = "v${version}";
13 sha256= "0jrxr8z21hjy7ik999hna9rdqy221kbkl3qkb06xw7g80rc9x9yr";
14 };
15
16 # Glibc 2.34 changed SIGSTKSZ to a dynamic value, which breaks
17 # PCMsolver. Replace SIGSTKZ by the backward-compatible _SC_SIGSTKSZ.
18 postPatch = ''
19 substituteInPlace external/Catch/catch.hpp \
20 --replace SIGSTKSZ _SC_SIGSTKSZ
21 '';
22
23 nativeBuildInputs = [
24 cmake
25 gfortran
26 perl
27 python3
28 ];
29
30 buildInputs = [
31 boost
32 eigen
33 zlib
34 ];
35
36 cmakeFlags = [ "-DENABLE_OPENMP=ON" ];
37
38 hardeningDisable = [ "format" ];
39
40 # Requires files, that are not installed.
41 doCheck = false;
42
43 meta = with lib; {
44 description = "An API for the Polarizable Continuum Model";
45 homepage = "https://pcmsolver.readthedocs.io/en/stable/";
46 license = licenses.lgpl3Only;
47 platforms = platforms.linux;
48 maintainers = [ maintainers.sheepforce ];
49 };
50}