From 8701d7668458a00d5372886436a76eeb70d9988b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 17 Mar 2025 23:16:53 +0100 Subject: [PATCH] conduit: init at 0.9.3 --- pkgs/by-name/co/conduit/package.nix | 65 +++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/co/conduit/package.nix diff --git a/pkgs/by-name/co/conduit/package.nix b/pkgs/by-name/co/conduit/package.nix new file mode 100644 index 000000000000..22c208d18637 --- /dev/null +++ b/pkgs/by-name/co/conduit/package.nix @@ -0,0 +1,65 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + openmpi, + + # passthru + conduit, + nix-update-script, + + mpiSupport ? false, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "conduit"; + version = "0.9.3"; + + src = fetchFromGitHub { + owner = "LLNL"; + repo = "conduit"; + tag = "v${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-R7DiMwaMG9VfqDJiO3kFPb76j6P2GZl/6qLxDfVex8A="; + }; + + nativeBuildInputs = [ + cmake + ]; + + cmakeDir = "../src"; + + buildInputs = lib.optionals mpiSupport [ + openmpi + ]; + + cmakeFlags = [ + (lib.cmakeBool "ENABLE_MPI" mpiSupport) + ]; + + installCheckPhase = '' + runHook preInstallCheck + + make test + + runHook postInstallCheck + ''; + doInstallCheck = true; + + passthru = { + tests = { + withMpi = conduit.override { mpiSupport = true; }; + }; + updateScript = nix-update-script { }; + }; + + meta = { + description = "Simplified Data Exchange for HPC Simulations"; + homepage = "https://github.com/LLNL/conduit"; + changelog = "https://github.com/LLNL/conduit/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.bsd3Lbnl; + maintainers = with lib.maintainers; [ GaetanLepage ]; + platforms = lib.platforms.all; + }; +})