cp2k: 2025.1 -> 2025.2, switch to CMake build (#429106)

authored by Markus Kowalewski and committed by GitHub 093f0037 fd1e6f49

+864 -302
+213
pkgs/applications/science/chemistry/cp2k/default.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + mpiCheckPhaseHook, 6 + cmake, 7 + python3, 8 + gfortran, 9 + blas, 10 + lapack, 11 + dbcsr, 12 + fftw, 13 + libint, 14 + libvori, 15 + libxc, 16 + dftd4, 17 + simple-dftd3, 18 + tblite, 19 + mpi, 20 + gsl, 21 + scalapack, 22 + makeWrapper, 23 + libxsmm, 24 + spglib, 25 + which, 26 + pkg-config, 27 + plumed, 28 + zlib, 29 + hdf5-fortran, 30 + sirius, 31 + libvdwxc, 32 + spla, 33 + spfft, 34 + trexio, 35 + toml-f, 36 + greenx, 37 + gmp, 38 + enableElpa ? false, 39 + elpa, 40 + cudaPackages, 41 + rocmPackages, 42 + config, 43 + gpuBackend ? ( 44 + if config.cudaSupport then 45 + "cuda" 46 + else if config.rocmSupport then 47 + "rocm" 48 + else 49 + "none" 50 + ), 51 + # Change to a value suitable for your target GPU. 52 + # see https://github.com/cp2k/cp2k/blob/master/CMakeLists.txt#L433 53 + hipTarget ? "gfx908", 54 + cudaTarget ? "80", 55 + }: 56 + 57 + assert builtins.elem gpuBackend [ 58 + "none" 59 + "cuda" 60 + "rocm" 61 + ]; 62 + 63 + stdenv.mkDerivation rec { 64 + pname = "cp2k"; 65 + version = "2025.2"; 66 + 67 + src = fetchFromGitHub { 68 + owner = "cp2k"; 69 + repo = "cp2k"; 70 + rev = "v${version}"; 71 + hash = "sha256-vfl5rCoFeGtYuZ7LcsVsESjKxFbN5IYDvBSzOqsd64w="; 72 + fetchSubmodules = true; 73 + }; 74 + 75 + patches = [ 76 + # Remove the build command line from the source. 77 + # This avoids dependencies to .dev inputs 78 + ./remove-compiler-options.patch 79 + 80 + # Fix pkg-config path generation 81 + ./pkgconfig.patch 82 + ]; 83 + 84 + nativeBuildInputs = [ 85 + python3 86 + cmake 87 + which 88 + makeWrapper 89 + pkg-config 90 + ] 91 + ++ lib.optional (gpuBackend == "cuda") cudaPackages.cuda_nvcc; 92 + 93 + buildInputs = [ 94 + gfortran 95 + fftw 96 + gsl 97 + libint 98 + libvori 99 + libxc 100 + dftd4 101 + simple-dftd3 102 + tblite 103 + libxsmm 104 + mpi 105 + spglib 106 + scalapack 107 + blas 108 + lapack 109 + dbcsr 110 + plumed 111 + zlib 112 + hdf5-fortran 113 + sirius 114 + spla 115 + spfft 116 + libvdwxc 117 + trexio 118 + toml-f 119 + greenx 120 + gmp 121 + ] 122 + ++ lib.optional enableElpa elpa 123 + ++ lib.optionals (gpuBackend == "cuda") [ 124 + cudaPackages.cuda_cudart 125 + cudaPackages.libcublas 126 + cudaPackages.cuda_nvrtc 127 + ] 128 + ++ lib.optionals (gpuBackend == "rocm") [ 129 + rocmPackages.clr 130 + rocmPackages.rocm-core 131 + rocmPackages.hipblas 132 + rocmPackages.hipfft 133 + rocmPackages.rocblas 134 + ]; 135 + 136 + propagatedBuildInputs = [ (lib.getBin mpi) ]; 137 + propagatedUserEnvPkgs = [ mpi ]; 138 + 139 + postPatch = '' 140 + patchShebangs tools exts/dbcsr/tools/build_utils exts/dbcsr/.cp2k 141 + substituteInPlace exts/build_dbcsr/Makefile \ 142 + --replace '/usr/bin/env python3' '${python3}/bin/python' \ 143 + --replace 'SHELL = /bin/sh' 'SHELL = bash' 144 + ''; 145 + 146 + cmakeFlags = [ 147 + (lib.strings.cmakeBool "CP2K_USE_DFTD4" true) 148 + (lib.strings.cmakeBool "CP2K_USE_TBLITE" true) 149 + (lib.strings.cmakeBool "CP2K_USE_FFTW3" true) 150 + (lib.strings.cmakeBool "CP2K_USE_HDF5" true) 151 + (lib.strings.cmakeBool "CP2K_USE_LIBINT2" true) 152 + (lib.strings.cmakeBool "CP2K_USE_LIBXC" true) 153 + (lib.strings.cmakeBool "CP2K_USE_MPI" true) 154 + (lib.strings.cmakeBool "CP2K_USE_VORI" true) 155 + (lib.strings.cmakeBool "CP2K_USE_TREXIO" true) 156 + (lib.strings.cmakeBool "CP2K_USE_SPGLIB" true) 157 + (lib.strings.cmakeBool "CP2K_USE_SPLA" true) 158 + (lib.strings.cmakeBool "CP2K_USE_LIBXSMM" true) 159 + (lib.strings.cmakeBool "CP2K_USE_SIRIUS" true) 160 + (lib.strings.cmakeBool "CP2K_USE_LIBVDWXC" true) 161 + (lib.strings.cmakeBool "CP2K_USE_PLUMED" true) 162 + (lib.strings.cmakeBool "CP2K_USE_GREENX" true) 163 + (lib.strings.cmakeBool "CP2K_USE_ELPA" enableElpa) 164 + (lib.strings.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 165 + ] 166 + ++ lib.optionals (gpuBackend == "rocm") [ 167 + (lib.strings.cmakeFeature "CP2K_USE_ACCEL" "HIP") 168 + (lib.strings.cmakeFeature "CMAKE_HIP_ARCHITECTURES" hipTarget) 169 + ] 170 + ++ lib.optionals (gpuBackend == "cuda") [ 171 + (lib.strings.cmakeFeature "CP2K_USE_ACCEL" "CUDA") 172 + (lib.strings.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaTarget) 173 + ]; 174 + 175 + nativeCheckInputs = [ 176 + mpiCheckPhaseHook 177 + ]; 178 + 179 + passthru = { 180 + inherit mpi; 181 + }; 182 + 183 + postInstall = '' 184 + mkdir -p $out/share/cp2k 185 + cp -r ../data/* $out/share/cp2k 186 + 187 + for i in $out/bin/*; do 188 + wrapProgram $i \ 189 + --set-default CP2K_DATA_DIR $out/share/cp2k \ 190 + --set-default OMP_NUM_THREADS 1 191 + done 192 + ''; 193 + 194 + doInstallCheck = gpuBackend == "none"; 195 + 196 + installCheckPhase = '' 197 + runHook preInstallCheck 198 + 199 + for TEST in $out/bin/{dbt_tas,dbt,libcp2k,parallel_rng_types,gx_ac}_unittest.psmp; do 200 + mpirun -n 2 $TEST 201 + done 202 + 203 + runHook postInstallCheck 204 + ''; 205 + 206 + meta = { 207 + description = "Quantum chemistry and solid state physics program"; 208 + homepage = "https://www.cp2k.org"; 209 + license = lib.licenses.gpl2Plus; 210 + maintainers = [ lib.maintainers.sheepforce ]; 211 + platforms = [ "x86_64-linux" ]; 212 + }; 213 + }
+14
pkgs/applications/science/chemistry/cp2k/pkgconfig.patch
··· 1 + diff --git a/cmake/libcp2k.pc.in b/cmake/libcp2k.pc.in 2 + index 618af55e28..8d08a51a0c 100644 3 + --- a/cmake/libcp2k.pc.in 4 + +++ b/cmake/libcp2k.pc.in 5 + @@ -1,7 +1,7 @@ 6 + prefix="@CMAKE_INSTALL_PREFIX@" 7 + exec_prefix="${prefix}" 8 + -libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@" 9 + -includedir="${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" 10 + +libdir=CMAKE_INSTALL_FULL_LIBDIR@" 11 + +includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@" 12 + 13 + Name: @PROJECT_NAME@ 14 + Description: @CMAKE_PROJECT_DESCRIPTION@
-270
pkgs/by-name/cp/cp2k/package.nix
··· 1 - { 2 - lib, 3 - stdenv, 4 - fetchFromGitHub, 5 - mpiCheckPhaseHook, 6 - python3, 7 - gfortran, 8 - blas, 9 - lapack, 10 - fftw, 11 - libint, 12 - libvori, 13 - libxc, 14 - dftd4, 15 - mctc-lib, 16 - mstore, 17 - multicharge, 18 - mpi, 19 - gsl, 20 - scalapack, 21 - makeWrapper, 22 - libxsmm, 23 - spglib, 24 - which, 25 - pkg-config, 26 - plumed, 27 - zlib, 28 - hdf5-fortran, 29 - sirius, 30 - libvdwxc, 31 - spla, 32 - spfft, 33 - enableElpa ? false, 34 - elpa, 35 - cudaPackages, 36 - rocmPackages, 37 - config, 38 - gpuBackend ? ( 39 - if config.cudaSupport then 40 - "cuda" 41 - else if config.rocmSupport then 42 - "rocm" 43 - else 44 - "none" 45 - ), 46 - # Change to a value suitable for your target GPU. 47 - # For AMD values see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2v-rocmhip-support-for-amd-gpu 48 - # and for Nvidia see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2i-cuda-optional-improved-performance-on-gpu-systems 49 - gpuVersion ? (if gpuBackend == "cuda" then "A100" else "Mi100"), 50 - gpuArch ? (if gpuBackend == "cuda" then "sm_80" else "gfx908"), 51 - }: 52 - 53 - assert builtins.elem gpuBackend [ 54 - "none" 55 - "cuda" 56 - "rocm" 57 - ]; 58 - 59 - let 60 - cp2kVersion = "psmp"; 61 - arch = "Linux-x86-64-gfortran"; 62 - 63 - in 64 - stdenv.mkDerivation rec { 65 - pname = "cp2k"; 66 - version = "2025.1"; 67 - 68 - src = fetchFromGitHub { 69 - owner = "cp2k"; 70 - repo = "cp2k"; 71 - tag = "v${version}"; 72 - hash = "sha256-04AFiEuv+EYubZVoYErQDdr9zipKlF7Gqy8DrUaYUMk="; 73 - fetchSubmodules = true; 74 - }; 75 - 76 - patches = [ 77 - # Remove the build command line from the source. 78 - # This avoids dependencies to .dev inputs 79 - ./remove-compiler-options.patch 80 - ]; 81 - 82 - nativeBuildInputs = [ 83 - python3 84 - which 85 - makeWrapper 86 - pkg-config 87 - ] 88 - ++ lib.optional (gpuBackend == "cuda") cudaPackages.cuda_nvcc; 89 - 90 - buildInputs = [ 91 - gfortran 92 - fftw 93 - gsl 94 - libint 95 - libvori 96 - libxc 97 - dftd4 98 - mctc-lib 99 - mstore 100 - multicharge 101 - libxsmm 102 - mpi 103 - spglib 104 - scalapack 105 - blas 106 - lapack 107 - plumed 108 - zlib 109 - hdf5-fortran 110 - sirius 111 - spla 112 - spfft 113 - libvdwxc 114 - ] 115 - ++ lib.optional enableElpa elpa 116 - ++ lib.optionals (gpuBackend == "cuda") [ 117 - cudaPackages.cuda_cudart 118 - cudaPackages.libcublas 119 - cudaPackages.cuda_nvrtc 120 - ] 121 - ++ lib.optionals (gpuBackend == "rocm") [ 122 - rocmPackages.clr 123 - rocmPackages.rocm-core 124 - rocmPackages.hipblas 125 - rocmPackages.hipfft 126 - rocmPackages.rocblas 127 - ]; 128 - 129 - propagatedBuildInputs = [ (lib.getBin mpi) ]; 130 - propagatedUserEnvPkgs = [ mpi ]; 131 - 132 - makeFlags = [ 133 - "ARCH=${arch}" 134 - "VERSION=${cp2kVersion}" 135 - ]; 136 - 137 - doCheck = gpuBackend == "none"; 138 - 139 - enableParallelBuilding = true; 140 - 141 - postPatch = '' 142 - patchShebangs tools exts/dbcsr/tools/build_utils exts/dbcsr/.cp2k 143 - substituteInPlace exts/build_dbcsr/Makefile \ 144 - --replace '/usr/bin/env python3' '${python3}/bin/python' \ 145 - --replace 'SHELL = /bin/sh' 'SHELL = bash' 146 - ''; 147 - 148 - configurePhase = '' 149 - runHook preConfigure 150 - 151 - cat > arch/${arch}.${cp2kVersion} << EOF 152 - CC = mpicc 153 - CPP = 154 - FC = mpif90 155 - LD = mpif90 156 - AR = ar -r 157 - ${lib.strings.optionalString (gpuBackend == "cuda") '' 158 - OFFLOAD_CC = nvcc 159 - OFFLOAD_FLAGS = -O3 -g -w --std=c++11 -arch ${gpuArch} 160 - OFFLOAD_TARGET = cuda 161 - GPUVER = ${gpuVersion} 162 - CXX = mpicxx 163 - CXXFLAGS = -std=c++11 -fopenmp 164 - ''} 165 - ${lib.strings.optionalString (gpuBackend == "rocm") '' 166 - GPUVER = ${gpuVersion} 167 - OFFLOAD_CC = hipcc 168 - OFFLOAD_FLAGS = -fopenmp -m64 -pthread -fPIC -D__GRID_HIP -O2 --offload-arch=${gpuArch} --rocm-path=${rocmPackages.rocm-core} 169 - OFFLOAD_TARGET = hip 170 - CXX = mpicxx 171 - CXXFLAGS = -std=c++11 -fopenmp -D__HIP_PLATFORM_AMD__ 172 - ''} 173 - DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \ 174 - -D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \ 175 - -D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"} \ 176 - -D__PLUMED2 -D__HDF5 -D__GSL -D__SIRIUS -D__LIBVDWXC -D__SPFFT -D__SPLA \ 177 - -D__DFTD4 \ 178 - ${ 179 - lib.strings.optionalString ( 180 - gpuBackend == "cuda" 181 - ) "-D__OFFLOAD_CUDA -D__ACC -D__DBCSR_ACC -D__NO_OFFLOAD_PW" 182 - } \ 183 - ${lib.strings.optionalString ( 184 - gpuBackend == "rocm" 185 - ) "-D__OFFLOAD_HIP -D__DBCSR_ACC -D__NO_OFFLOAD_PW"} 186 - CFLAGS = -fopenmp 187 - FCFLAGS = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \ 188 - -ftree-vectorize -funroll-loops -msse2 \ 189 - -std=f2008 \ 190 - -fopenmp -ftree-vectorize -funroll-loops \ 191 - ${lib.optionalString enableElpa "$(pkg-config --variable=fcflags elpa)"} \ 192 - -I${lib.getDev libint}/include \ 193 - -I${lib.getDev sirius}/include/sirius \ 194 - -I${lib.getDev libxc}/include \ 195 - -I${lib.getDev dftd4}/include/dftd4 \ 196 - -I${lib.getDev libxsmm}/include \ 197 - -I${lib.getDev hdf5-fortran}/include \ 198 - -fallow-argument-mismatch 199 - LIBS = -lfftw3 -lfftw3_threads \ 200 - -lscalapack -lblas -llapack \ 201 - -lxcf03 -lxc -lxsmmf -lxsmm -lsymspg \ 202 - -lint2 -lstdc++ -lvori \ 203 - -lgomp -lpthread -lm \ 204 - -fopenmp ${lib.optionalString enableElpa "$(pkg-config --libs elpa)"} \ 205 - -lz -ldl ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \ 206 - -lplumed -lhdf5_fortran -lhdf5_hl -lhdf5 -lgsl -lsirius -lspla -lspfft -lvdwxc \ 207 - -ldftd4 -lmstore -lmulticharge -lmctc-lib \ 208 - ${ 209 - lib.strings.optionalString (gpuBackend == "cuda") '' 210 - -L${cudaPackages.cuda_cudart}/lib/stubs/ \ 211 - -lcudart -lnvrtc -lcuda -lcublas 212 - '' 213 - } \ 214 - ${lib.strings.optionalString ( 215 - gpuBackend == "rocm" 216 - ) "-lamdhip64 -lhipfft -lhipblas -lrocblas"} 217 - LDFLAGS = \$(FCFLAGS) \$(LIBS) 218 - include ${plumed}/lib/plumed/src/lib/Plumed.inc 219 - EOF 220 - 221 - runHook postConfigure 222 - ''; 223 - 224 - nativeCheckInputs = [ 225 - mpiCheckPhaseHook 226 - ]; 227 - 228 - checkPhase = '' 229 - runHook preCheck 230 - 231 - export CP2K_DATA_DIR=data 232 - mpirun -np 2 exe/${arch}/libcp2k_unittest.${cp2kVersion} 233 - 234 - runHook postCheck 235 - ''; 236 - 237 - installPhase = '' 238 - runHook preInstall 239 - 240 - mkdir -p $out/bin $out/share/cp2k 241 - 242 - cp exe/${arch}/* $out/bin 243 - rm $out/bin/*_unittest.* 244 - 245 - for i in cp2k cp2k_shell graph; do 246 - wrapProgram $out/bin/$i.${cp2kVersion} \ 247 - --set-default CP2K_DATA_DIR $out/share/cp2k 248 - done 249 - 250 - wrapProgram $out/bin/cp2k.popt \ 251 - --set-default CP2K_DATA_DIR $out/share/cp2k \ 252 - --set OMP_NUM_THREADS 1 253 - 254 - cp -r data/* $out/share/cp2k 255 - 256 - runHook postInstall 257 - ''; 258 - 259 - passthru = { 260 - inherit mpi; 261 - }; 262 - 263 - meta = { 264 - description = "Quantum chemistry and solid state physics program"; 265 - homepage = "https://www.cp2k.org"; 266 - license = lib.licenses.gpl2Plus; 267 - maintainers = [ lib.maintainers.sheepforce ]; 268 - platforms = [ "x86_64-linux" ]; 269 - }; 270 - }
pkgs/by-name/cp/cp2k/remove-compiler-options.patch pkgs/applications/science/chemistry/cp2k/remove-compiler-options.patch
+13
pkgs/by-name/df/dftd4/cmake.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 3d6efbb..e338a42 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+25 -3
pkgs/by-name/df/dftd4/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchFromGitHub, 5 + fetchpatch, 5 6 gfortran, 7 + buildType ? "meson", 8 + cmake, 6 9 meson, 7 10 ninja, 8 11 pkg-config, ··· 15 18 }: 16 19 17 20 assert !blas.isILP64 && !lapack.isILP64; 21 + assert ( 22 + builtins.elem buildType [ 23 + "meson" 24 + "cmake" 25 + ] 26 + ); 18 27 19 28 stdenv.mkDerivation rec { 20 29 pname = "dftd4"; ··· 30 39 patches = [ 31 40 # Make sure fortran headers are installed directly in /include 32 41 ./fortran-module-dir.patch 42 + 43 + # Fix wrong generation of package config include paths 44 + ./cmake.patch 33 45 ]; 34 46 35 47 nativeBuildInputs = [ 36 48 gfortran 37 - meson 38 - ninja 39 49 pkg-config 40 50 python3 41 - ]; 51 + ] 52 + ++ lib.optionals (buildType == "meson") [ 53 + meson 54 + ninja 55 + ] 56 + ++ lib.optional (buildType == "cmake") cmake; 42 57 43 58 buildInputs = [ 44 59 blas 45 60 lapack 61 + ]; 62 + 63 + propagatedBuildInputs = [ 46 64 mctc-lib 47 65 mstore 48 66 multicharge 67 + ]; 68 + 69 + cmakeFlags = [ 70 + (lib.strings.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 49 71 ]; 50 72 51 73 outputs = [
+48
pkgs/by-name/gr/greenx/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gfortran, 6 + cmake, 7 + pkg-config, 8 + blas, 9 + lapack, 10 + }: 11 + 12 + stdenv.mkDerivation rec { 13 + pname = "greenx"; 14 + version = "2.2"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "nomad-coe"; 18 + repo = "greenx"; 19 + rev = "v${version}"; 20 + hash = "sha256-otIs2Y79KoEL4ut8YQe7Y27LpmpId8h/X8B6GIg8l+E="; 21 + }; 22 + 23 + nativeBuildInputs = [ 24 + gfortran 25 + pkg-config 26 + cmake 27 + ]; 28 + 29 + buildInputs = [ 30 + blas 31 + lapack 32 + ]; 33 + 34 + # Uses a hacky python setup run by cmake, which is hard to get running 35 + doCheck = false; 36 + 37 + preCheck = '' 38 + export OMP_NUM_THREADS=2 39 + ''; 40 + 41 + meta = with lib; { 42 + description = "Library for Green’s function based electronic structure theory calculations"; 43 + license = [ licenses.asl20 ]; 44 + homepage = "https://github.com/nomad-coe/greenX"; 45 + platforms = platforms.linux; 46 + maintainers = [ maintainers.sheepforce ]; 47 + }; 48 + }
+13
pkgs/by-name/jo/jonquil/cmake.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index b2d3c73..00eb732 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=/@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+71
pkgs/by-name/jo/jonquil/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gfortran, 6 + buildType ? "meson", 7 + meson, 8 + ninja, 9 + cmake, 10 + pkg-config, 11 + test-drive, 12 + toml-f, 13 + }: 14 + 15 + assert ( 16 + builtins.elem buildType [ 17 + "meson" 18 + "cmake" 19 + ] 20 + ); 21 + 22 + stdenv.mkDerivation rec { 23 + pname = "jonquil"; 24 + version = "0.3.0"; 25 + 26 + src = fetchFromGitHub { 27 + owner = "toml-f"; 28 + repo = pname; 29 + rev = "v${version}"; 30 + hash = "sha256-2JCTHA0nyA7xE0IA+LNrEAulHU2eIbNRvFGQ7YSQMRE="; 31 + }; 32 + 33 + patches = [ 34 + # Fix wrong generation of package config include paths 35 + ./cmake.patch 36 + ]; 37 + 38 + nativeBuildInputs = [ 39 + gfortran 40 + pkg-config 41 + ] 42 + ++ lib.optionals (buildType == "meson") [ 43 + meson 44 + ninja 45 + ] 46 + ++ lib.optional (buildType == "cmake") cmake; 47 + 48 + buildInputs = [ 49 + test-drive 50 + ]; 51 + 52 + propagatedBuildInputs = [ 53 + toml-f 54 + ]; 55 + 56 + outputs = [ 57 + "out" 58 + "dev" 59 + ]; 60 + 61 + meta = with lib; { 62 + description = "JSON parser on top of TOML implementation"; 63 + license = with licenses; [ 64 + asl20 65 + mit 66 + ]; 67 + homepage = "https://github.com/toml-f/jonquil"; 68 + platforms = platforms.linux; 69 + maintainers = [ maintainers.sheepforce ]; 70 + }; 71 + }
+10 -2
pkgs/by-name/li/libxc/package.nix
··· 5 5 cmake, 6 6 gfortran, 7 7 perl, 8 + version ? "6.2.2", 8 9 }: 9 10 11 + let 12 + versionHashes = { 13 + "6.2.2" = "sha256-JYhuyW95I7Q0edLIe7H//+ej5vh6MdAGxXjmNxDMuhQ="; 14 + "7.0.0" = "sha256-mGyGtKDurOrSS0AYrtwhF62pJGPBLbPPNBgFV7fyyug="; 15 + }; 16 + 17 + in 10 18 stdenv.mkDerivation rec { 11 19 pname = "libxc"; 12 - version = "6.2.2"; 20 + inherit version; 13 21 14 22 src = fetchFromGitLab { 15 23 owner = "libxc"; 16 24 repo = "libxc"; 17 25 rev = version; 18 - hash = "sha256-JYhuyW95I7Q0edLIe7H//+ej5vh6MdAGxXjmNxDMuhQ="; 26 + hash = versionHashes."${version}"; 19 27 }; 20 28 21 29 # Timeout increase has already been included upstream in master.
+29
pkgs/by-name/mc/mctc-lib/cmake.patch
··· 1 + diff --git a/config/template.cmake b/config/template.cmake 2 + index 2b3abcbb..59fcd728 100644 3 + --- a/config/template.cmake 4 + +++ b/config/template.cmake 5 + @@ -8,9 +8,7 @@ if(NOT TARGET "@PROJECT_NAME@::@PROJECT_NAME@") 6 + 7 + include(CMakeFindDependencyMacro) 8 + 9 + - if(NOT TARGET "OpenMP::OpenMP_Fortran" AND "@PROJECT_NAME@_WITH_OpenMP") 10 + - find_dependency("OpenMP") 11 + - endif() 12 + + find_dependency("OpenMP") 13 + 14 + if(NOT TARGET "toml-f::toml-f" AND "@PROJECT_NAME@_WITH_JSON") 15 + find_dependency("toml-f") 16 + diff --git a/config/template.pc b/config/template.pc 17 + index 84c3498c..2da50191 100644 18 + --- a/config/template.pc 19 + +++ b/config/template.pc 20 + @@ -1,6 +1,6 @@ 21 + -prefix=@CMAKE_INSTALL_PREFIX@ 22 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 23 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 24 + +prefix=@CMAKE_INSTALL_PREFIX@ 25 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 26 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 27 + 28 + Name: @PROJECT_NAME@ 29 + Description: @PROJECT_DESCRIPTION@
+37
pkgs/by-name/mc/mctc-lib/meson.patch
··· 1 + diff --git a/config/meson.build b/config/meson.build 2 + index f54857ee..aaafdb03 100644 3 + --- a/config/meson.build 4 + +++ b/config/meson.build 5 + @@ -56,9 +56,12 @@ jonquil_dep = dependency( 6 + 'jonquil', 7 + required: get_option('json'), 8 + fallback: ['jonquil','jonquil_dep'], 9 + - default_options: [ 10 + - 'default_library=static', 11 + - ], 12 + - static: get_option('default_library') != 'dynamic', 13 + ) 14 + lib_deps += jonquil_dep 15 + + 16 + +tomlf_dep = dependency( 17 + + 'toml-f', 18 + + required: get_option('json'), 19 + + fallback: ['toml-f','toml-f_dep'], 20 + +) 21 + +lib_deps += tomlf_dep 22 + diff --git a/meson.build b/meson.build 23 + index 16797c47..6e5290d9 100644 24 + --- a/meson.build 25 + +++ b/meson.build 26 + @@ -25,11 +25,6 @@ project( 27 + ) 28 + install = not (meson.is_subproject() and get_option('default_library') == 'static') 29 + 30 + -# Check for specific unsupported meson versions 31 + -if meson.version().version_compare('==1.8.0') 32 + - error('Meson version 1.8.0 has a known issue — please use any other version ≥ 0.55.0') 33 + -endif 34 + - 35 + # General configuration information 36 + lib_deps = [] 37 + subdir('config')
+31 -7
pkgs/by-name/mc/mctc-lib/package.nix
··· 3 3 lib, 4 4 fetchFromGitHub, 5 5 gfortran, 6 + buildType ? "meson", 6 7 meson, 7 8 ninja, 9 + cmake, 8 10 pkg-config, 9 11 python3, 10 - json-fortran, 12 + toml-f, 13 + jonquil, 11 14 }: 12 15 16 + assert ( 17 + builtins.elem buildType [ 18 + "meson" 19 + "cmake" 20 + ] 21 + ); 22 + 13 23 stdenv.mkDerivation rec { 14 24 pname = "mctc-lib"; 15 - version = "0.4.1"; 25 + version = "0.4.2"; 16 26 17 27 src = fetchFromGitHub { 18 28 owner = "grimme-lab"; 19 29 repo = "mctc-lib"; 20 30 rev = "v${version}"; 21 - hash = "sha256-AMRHvzL6CUPItCs07LLOB6Al3yfs8WgrPKRhuNbXiGw="; 31 + hash = "sha256-Qd7mpNE23Z+LuiUwhUzfVzVZEQ+sdnkxMm+W7Hlrss4="; 22 32 }; 23 33 34 + patches = [ 35 + # Allow dynamically linked jonquil as dependency. That then additionally 36 + # requires linking in toml-f 37 + ./meson.patch 38 + 39 + # Fix wrong generation of package config include paths 40 + ./cmake.patch 41 + ]; 42 + 24 43 nativeBuildInputs = [ 25 44 gfortran 45 + pkg-config 46 + python3 47 + ] 48 + ++ lib.optionals (buildType == "meson") [ 26 49 meson 27 50 ninja 28 - pkg-config 29 - python3 51 + ] 52 + ++ lib.optional (buildType == "cmake") cmake; 53 + 54 + buildInputs = [ 55 + jonquil 30 56 ]; 31 - 32 - buildInputs = [ json-fortran ]; 33 57 34 58 outputs = [ 35 59 "out"
+20 -3
pkgs/by-name/ms/mstore/package.nix
··· 3 3 lib, 4 4 fetchFromGitHub, 5 5 gfortran, 6 + buildType ? "meson", 6 7 meson, 7 8 ninja, 9 + cmake, 8 10 pkg-config, 9 11 python3, 10 12 mctc-lib, 11 13 }: 12 14 15 + assert ( 16 + builtins.elem buildType [ 17 + "meson" 18 + "cmake" 19 + ] 20 + ); 21 + 13 22 stdenv.mkDerivation rec { 14 23 pname = "mstore"; 15 24 version = "0.3.0"; ··· 21 30 hash = "sha256-zfrxdrZ1Um52qTRNGJoqZNQuHhK3xM/mKfk0aBLrcjw="; 22 31 }; 23 32 33 + patches = [ 34 + # Fix wrong generation of package config include paths 35 + ./pkgconfig.patch 36 + ]; 37 + 24 38 nativeBuildInputs = [ 25 39 gfortran 40 + pkg-config 41 + python3 42 + ] 43 + ++ lib.optionals (buildType == "meson") [ 26 44 meson 27 45 ninja 28 - pkg-config 29 - python3 30 - ]; 46 + ] 47 + ++ lib.optional (buildType == "cmake") cmake; 31 48 32 49 buildInputs = [ mctc-lib ]; 33 50
+13
pkgs/by-name/ms/mstore/pkgconfig.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 800947d..d388699 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+22 -3
pkgs/by-name/mu/multicharge/package.nix
··· 3 3 lib, 4 4 fetchFromGitHub, 5 5 gfortran, 6 + buildType ? "meson", 6 7 meson, 7 8 ninja, 9 + cmake, 8 10 pkg-config, 9 11 python3, 10 12 blas, ··· 14 16 }: 15 17 16 18 assert !blas.isILP64 && !lapack.isILP64; 19 + assert ( 20 + builtins.elem buildType [ 21 + "meson" 22 + "cmake" 23 + ] 24 + ); 17 25 18 26 stdenv.mkDerivation rec { 19 27 pname = "multicharge"; ··· 25 33 rev = "v${version}"; 26 34 hash = "sha256-8qwM3dpvFoL2WrMWNf14zYtRap0ijdfZ95XaTlkHhqQ="; 27 35 }; 36 + 37 + patches = [ 38 + # Fix wrong generation of package config include paths 39 + ./pkgconfig.patch 40 + ]; 28 41 29 42 nativeBuildInputs = [ 30 43 gfortran 31 - meson 32 - ninja 33 44 pkg-config 34 45 python3 35 - ]; 46 + ] 47 + ++ lib.optionals (buildType == "meson") [ 48 + meson 49 + ninja 50 + ] 51 + ++ lib.optional (buildType == "cmake") cmake; 36 52 37 53 buildInputs = [ 38 54 blas 39 55 lapack 56 + ]; 57 + 58 + propagatedBuildInputs = [ 40 59 mctc-lib 41 60 mstore 42 61 ];
+13
pkgs/by-name/mu/multicharge/pkgconfig.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 3d6efbb..e338a42 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+51
pkgs/by-name/op/openorbitaloptimizer/package.nix
··· 1 + { 2 + stdenv, 3 + lib, 4 + fetchFromGitHub, 5 + gfortran, 6 + cmake, 7 + pkg-config, 8 + armadillo, 9 + blas, 10 + lapack, 11 + }: 12 + 13 + stdenv.mkDerivation rec { 14 + pname = "OpenOrbitalOptimizer"; 15 + version = "0.1.0"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "susilethola"; 19 + repo = "openorbitaloptimizer"; 20 + rev = "v${version}"; 21 + hash = "sha256-otIs2Y79KoEL4ut8YQe7Y27LpmpId8h/X8B6GIg8l+E="; 22 + }; 23 + 24 + nativeBuildInputs = [ 25 + pkg-config 26 + cmake 27 + gfortran 28 + ]; 29 + 30 + buildInputs = [ 31 + armadillo 32 + blas 33 + lapack 34 + ]; 35 + 36 + outputs = [ 37 + "out" 38 + "dev" 39 + ]; 40 + 41 + # Uses a hacky python setup run by cmake, which is hard to get running 42 + doCheck = false; 43 + 44 + meta = with lib; { 45 + description = "Common orbital optimisation algorithms for quantum chemistry"; 46 + license = [ licenses.mpl20 ]; 47 + homepage = "https://github.com/susilehtola/OpenOrbitalOptimizer"; 48 + platforms = platforms.linux; 49 + maintainers = [ maintainers.sheepforce ]; 50 + }; 51 + }
+17 -3
pkgs/by-name/si/sirius/package.nix
··· 22 22 boost, 23 23 eigen, 24 24 libvdwxc, 25 + dftd4, 26 + simple-dftd3, 27 + mctc-lib, 28 + jonquil, 29 + toml-f, 30 + multicharge, 25 31 enablePython ? false, 26 32 pythonPackages ? null, 27 33 llvmPackages, ··· 47 53 48 54 stdenv.mkDerivation rec { 49 55 pname = "SIRIUS"; 50 - version = "7.6.2"; 56 + version = "7.8.0-unstable-2025-07-23"; 51 57 52 58 src = fetchFromGitHub { 53 59 owner = "electronic-structure"; 54 60 repo = "SIRIUS"; 55 - rev = "v${version}"; 56 - hash = "sha256-A3WiEzo2ianxdF9HMZN9cT0lFosToGEHh0o6uBSAYqU="; 61 + rev = "258c8c6543af0350ac002a52fbe18221ea275590"; 62 + hash = "sha256-HHt3iw3muIGz86NmI9p6yuv7jrXoiz/83qTTueU7Lpk="; 57 63 }; 58 64 59 65 outputs = [ ··· 84 90 boost 85 91 eigen 86 92 libvdwxc 93 + jonquil 94 + simple-dftd3 95 + dftd4 96 + mctc-lib 97 + toml-f 98 + multicharge 87 99 ] 88 100 ++ lib.optionals (gpuBackend == "cuda") [ 89 101 cudaPackages.cuda_cudart ··· 131 143 "-DSIRIUS_USE_VDWXC=ON" 132 144 "-DSIRIUS_CREATE_FORTRAN_BINDINGS=ON" 133 145 "-DSIRIUS_USE_OPENMP=ON" 146 + "-DSIRIUS_USE_DFTD3=ON" 147 + "-DSIRIUS_USE_DFTD4=ON" 134 148 "-DBUILD_TESTING=ON" 135 149 ] 136 150 ++ lib.optionals (gpuBackend == "cuda") [
+13
pkgs/by-name/te/test-drive/cmake.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 3d6efbb..e338a42 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+18 -3
pkgs/by-name/te/test-drive/package.nix
··· 3 3 lib, 4 4 fetchFromGitHub, 5 5 gfortran, 6 + buildType ? "meson", 6 7 meson, 7 8 ninja, 9 + cmake, 8 10 mesonEmulatorHook, 9 11 }: 10 12 13 + assert ( 14 + builtins.elem buildType [ 15 + "meson" 16 + "cmake" 17 + ] 18 + ); 19 + 11 20 stdenv.mkDerivation rec { 12 21 pname = "test-drive"; 13 22 version = "0.5.0"; ··· 19 28 hash = "sha256-xRx8ErIN9xjxZt/nEsdIQkIGFRltuELdlI8lXA+M030="; 20 29 }; 21 30 31 + patches = [ 32 + # Fix wrong generation of package config include paths 33 + ./cmake.patch 34 + ]; 35 + 22 36 nativeBuildInputs = [ 23 37 gfortran 38 + ] 39 + ++ lib.optionals (buildType == "meson") [ 24 40 meson 25 41 ninja 26 42 ] 27 - ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ 28 - mesonEmulatorHook 29 - ]; 43 + ++ lib.optional (buildType == "cmake") cmake 44 + ++ lib.optional (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) mesonEmulatorHook; 30 45 31 46 mesonAutoFeatures = "auto"; 32 47
+13
pkgs/by-name/to/toml-f/cmake.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 3d6efbb..e338a42 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+23 -2
pkgs/by-name/to/toml-f/package.nix
··· 3 3 lib, 4 4 fetchFromGitHub, 5 5 gfortran, 6 + buildType ? "meson", 6 7 meson, 7 8 ninja, 9 + cmake, 8 10 pkg-config, 9 11 test-drive, 10 12 }: 11 13 14 + assert ( 15 + builtins.elem buildType [ 16 + "meson" 17 + "cmake" 18 + ] 19 + ); 20 + 12 21 stdenv.mkDerivation rec { 13 22 pname = "toml-f"; 14 23 version = "0.4.2"; ··· 20 29 hash = "sha256-+cac4rUNpd2w3yBdH1XoCKdJ9IgOHZioZg8AhzGY0FE="; 21 30 }; 22 31 32 + patches = [ 33 + # Fix wrong generation of package config include paths 34 + ./cmake.patch 35 + ]; 36 + 23 37 nativeBuildInputs = [ 24 38 gfortran 39 + pkg-config 40 + ] 41 + ++ lib.optionals (buildType == "meson") [ 25 42 meson 26 43 ninja 27 - pkg-config 28 - ]; 44 + ] 45 + ++ lib.optional (buildType == "cmake") cmake; 29 46 30 47 buildInputs = [ test-drive ]; 31 48 32 49 outputs = [ 33 50 "out" 34 51 "dev" 52 + ]; 53 + 54 + cmakeFlags = [ 55 + "-Dtest-drive_DIR=${test-drive}" 35 56 ]; 36 57 37 58 # tftest-build fails on aarch64-linux
+13
pkgs/development/libraries/science/chemistry/simple-dftd3/cmake.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 3d6efbb..e338a42 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+21 -2
pkgs/development/libraries/science/chemistry/simple-dftd3/default.nix
··· 5 5 gfortran, 6 6 meson, 7 7 ninja, 8 + cmake, 8 9 pkg-config, 9 10 mctc-lib, 10 11 mstore, 11 12 toml-f, 12 13 blas, 14 + buildType ? "meson", 13 15 }: 14 16 15 17 assert !blas.isILP64; 18 + assert ( 19 + builtins.elem buildType [ 20 + "meson" 21 + "cmake" 22 + ] 23 + ); 16 24 17 25 stdenv.mkDerivation rec { 18 26 pname = "simple-dftd3"; ··· 24 32 tag = "v${version}"; 25 33 hash = "sha256-c4xctcMcPQ70ippqbwtinygmnZ5en6ZGF5/v0ZWtzys="; 26 34 }; 35 + 36 + patches = [ 37 + ./cmake.patch 38 + ]; 27 39 28 40 nativeBuildInputs = [ 29 41 gfortran 42 + pkg-config 43 + ] 44 + ++ lib.optionals (buildType == "meson") [ 30 45 meson 31 46 ninja 32 - pkg-config 33 - ]; 47 + ] 48 + ++ lib.optional (buildType == "cmake") cmake; 34 49 35 50 buildInputs = [ 36 51 mctc-lib ··· 42 57 outputs = [ 43 58 "out" 44 59 "dev" 60 + ]; 61 + 62 + cmakeFlags = [ 63 + (lib.strings.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) 45 64 ]; 46 65 47 66 doCheck = true;
+39 -4
pkgs/development/libraries/science/chemistry/tblite/default.nix
··· 3 3 lib, 4 4 fetchFromGitHub, 5 5 gfortran, 6 + buildType ? "meson", 6 7 meson, 7 8 ninja, 9 + cmake, 8 10 pkg-config, 9 11 blas, 10 12 lapack, ··· 14 16 multicharge, 15 17 dftd4, 16 18 simple-dftd3, 19 + python3, 17 20 }: 18 21 19 22 assert !blas.isILP64 && !lapack.isILP64; 23 + assert ( 24 + builtins.elem buildType [ 25 + "meson" 26 + "cmake" 27 + ] 28 + ); 20 29 21 30 stdenv.mkDerivation rec { 22 31 pname = "tblite"; 23 - version = "0.4.0"; 32 + version = "0.5.0"; 24 33 25 34 src = fetchFromGitHub { 26 35 owner = "tblite"; 27 36 repo = pname; 28 37 rev = "v${version}"; 29 - hash = "sha256-KV2fxB+SF4LilN/87YCvxUt4wsY4YyIV4tqnn+3/0oI="; 38 + hash = "sha256-hePy/slEeM2o1gtrAbq/nkEUILa6oQjkD2ddDstQ2Zc="; 30 39 }; 31 40 41 + patches = [ 42 + ./0001-fix-multicharge-dep-needed-for-static-compilation.patch 43 + 44 + # Fix wrong paths in pkg-config file 45 + ./pkgconfig.patch 46 + ]; 47 + 48 + # Python scripts in test subdirectories to run the tests 49 + postPatch = '' 50 + patchShebangs ./ 51 + ''; 52 + 32 53 nativeBuildInputs = [ 33 54 gfortran 55 + pkg-config 56 + ] 57 + ++ lib.optionals (buildType == "meson") [ 34 58 meson 35 59 ninja 36 - pkg-config 60 + ] 61 + ++ lib.optionals (buildType == "cmake") [ 62 + cmake 37 63 ]; 38 64 39 65 buildInputs = [ ··· 52 78 "dev" 53 79 ]; 54 80 55 - doCheck = true; 81 + checkInputs = [ 82 + python3 83 + ]; 84 + 85 + checkFlags = [ 86 + "-j1" # Tests hang when multiple are run in parallel 87 + ]; 88 + 89 + doCheck = buildType == "meson"; 90 + 56 91 preCheck = '' 57 92 export OMP_NUM_THREADS=2 58 93 '';
+13
pkgs/development/libraries/science/chemistry/tblite/pkgconfig.patch
··· 1 + diff --git a/config/template.pc b/config/template.pc 2 + index 3d6efbb..e338a42 100644 3 + --- a/config/template.pc 4 + +++ b/config/template.pc 5 + @@ -1,6 +1,6 @@ 6 + prefix=@CMAKE_INSTALL_PREFIX@ 7 + -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ 8 + -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ 9 + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 10 + +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 11 + 12 + Name: @PROJECT_NAME@ 13 + Description: @PROJECT_DESCRIPTION@
+71
pkgs/top-level/all-packages.nix
··· 14472 14472 14473 14473 avogadro2 = libsForQt5.callPackage ../applications/science/chemistry/avogadro2 { }; 14474 14474 14475 + libxc_7 = pkgs.libxc.override { version = "7.0.0"; }; 14476 + 14475 14477 molbar = with python3Packages; toPythonApplication molbar; 14476 14478 14477 14479 nwchem = callPackage ../applications/science/chemistry/nwchem { ··· 14490 14492 siesta = callPackage ../applications/science/chemistry/siesta { }; 14491 14493 14492 14494 siesta-mpi = callPackage ../applications/science/chemistry/siesta { useMpi = true; }; 14495 + 14496 + cp2k = 14497 + # CP2K requires all dependencies from the Grimme ecosystem to be build with 14498 + # CMake instead of Meson. Unfortunately most other consumers require meson 14499 + let 14500 + grimmeCmake = lib.makeScope pkgs.newScope (self: { 14501 + mctc-lib = pkgs.mctc-lib.override { 14502 + buildType = "cmake"; 14503 + inherit (self) jonquil toml-f; 14504 + }; 14505 + 14506 + toml-f = pkgs.toml-f.override { 14507 + buildType = "cmake"; 14508 + inherit (self) test-drive; 14509 + }; 14510 + 14511 + dftd4 = pkgs.dftd4.override { 14512 + buildType = "cmake"; 14513 + inherit (self) mstore mctc-lib multicharge; 14514 + }; 14515 + 14516 + jonquil = pkgs.jonquil.override { 14517 + buildType = "cmake"; 14518 + inherit (self) toml-f test-drive; 14519 + }; 14520 + 14521 + mstore = pkgs.mstore.override { 14522 + buildType = "cmake"; 14523 + inherit (self) mctc-lib; 14524 + }; 14525 + 14526 + multicharge = pkgs.multicharge.override { 14527 + buildType = "cmake"; 14528 + inherit (self) mctc-lib mstore; 14529 + }; 14530 + 14531 + test-drive = pkgs.test-drive.override { buildType = "cmake"; }; 14532 + 14533 + simple-dftd3 = pkgs.simple-dftd3.override { 14534 + buildType = "cmake"; 14535 + inherit (self) mctc-lib mstore toml-f; 14536 + }; 14537 + 14538 + tblite = pkgs.tblite.override { 14539 + buildType = "cmake"; 14540 + inherit (self) 14541 + mctc-lib 14542 + mstore 14543 + toml-f 14544 + multicharge 14545 + dftd4 14546 + simple-dftd3 14547 + ; 14548 + }; 14549 + 14550 + sirius = pkgs.sirius.override { 14551 + inherit (self) 14552 + mctc-lib 14553 + toml-f 14554 + multicharge 14555 + dftd4 14556 + simple-dftd3 14557 + ; 14558 + }; 14559 + }); 14560 + in 14561 + grimmeCmake.callPackage ../applications/science/chemistry/cp2k/default.nix { 14562 + libxc = pkgs.libxc_7; 14563 + }; 14493 14564 14494 14565 ### SCIENCE/GEOMETRY 14495 14566