nixpkgs/pkgs/by-name/pc/pcmsolver/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

52 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, perl, gfortran, python3
, boost, eigen, zlib
} :
stdenv.mkDerivation rec {
pname = "pcmsolver";
version = "1.3.0";
src = fetchFromGitHub {
owner = "PCMSolver";
repo = pname;
rev = "v${version}";
sha256= "0jrxr8z21hjy7ik999hna9rdqy221kbkl3qkb06xw7g80rc9x9yr";
};
# Glibc 2.34 changed SIGSTKSZ to a dynamic value, which breaks
# PCMsolver. Replace SIGSTKZ by the backward-compatible _SC_SIGSTKSZ.
postPatch = ''
substituteInPlace external/Catch/catch.hpp \
--replace SIGSTKSZ _SC_SIGSTKSZ
'';
nativeBuildInputs = [
cmake
gfortran
perl
python3
];
buildInputs = [
boost
eigen
zlib
];
cmakeFlags = [ "-DENABLE_OPENMP=ON" ];
hardeningDisable = [ "format" ];
# Requires files, that are not installed.
doCheck = false;
meta = with lib; {
description = "API for the Polarizable Continuum Model";
mainProgram = "run_pcm";
homepage = "https://pcmsolver.readthedocs.io/en/stable/";
license = licenses.lgpl3Only;
platforms = platforms.linux;
maintainers = [ maintainers.sheepforce ];
};
}