Files
nixpkgs/pkgs/by-name/pd/pdi/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

94 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
# nativeBuildInputs
python3,
cmake,
gfortran,
pkg-config,
hdf5-mpi,
zpp,
# buildInputs
gbenchmark,
libyaml,
mpi,
spdlog,
# passthru
nix-update-script,
testers,
pdi,
}:
let
python = python3.withPackages (
p: with p; [
distutils
setuptools
]
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "pdi";
version = "1.9.2";
src = fetchFromGitHub {
owner = "pdidev";
repo = "pdi";
tag = finalAttrs.version;
hash = "sha256-bbhsMbTVvG19vtkZyOiCRH168kCFk2ahSFc7davfXzo=";
};
# Current hdf5 version in nixpkgs is 1.14.4.3 which is 4 numbers long and doesn't match the 3 number regex. :')
# Patch it to make it match a 4 number-long version.
postPatch = ''
substituteInPlace plugins/decl_hdf5/cmake/FindHDF5.cmake \
--replace-fail '"H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+)' '"H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)*)'
'';
nativeBuildInputs = [
cmake
gfortran
pkg-config
python
hdf5-mpi
zpp
];
buildInputs = [
gbenchmark
hdf5-mpi
libyaml
mpi
spdlog
];
cmakeFlags = [
# Force using nix gbenchmark instead of vendored version
(lib.cmakeFeature "USE_benchmark" "SYSTEM")
];
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion {
package = pdi;
command = "pdirun";
};
};
meta = {
description = "Library that aims todecouple high-performance simulation codes from I/O concerns";
homepage = "https://pdi.dev/master/";
changelog = "https://github.com/pdidev/pdi/releases/tag/${finalAttrs.version}";
license = lib.licenses.bsd3;
mainProgram = "pdirun";
maintainers = with lib.maintainers; [ GaetanLepage ];
badPlatforms = [
# fatal error: 'link.h' file not found
lib.systems.inspect.patterns.isDarwin
];
};
})