diff options
Diffstat (limited to 'pkgs/by-name/hy/hypre/package.nix')
-rw-r--r-- | pkgs/by-name/hy/hypre/package.nix | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/by-name/hy/hypre/package.nix b/pkgs/by-name/hy/hypre/package.nix new file mode 100644 index 0000000000000..1b5c918bee45b --- /dev/null +++ b/pkgs/by-name/hy/hypre/package.nix @@ -0,0 +1,47 @@ +{ + lib, + stdenv, + fetchFromGitHub, + mpi, +}: + +stdenv.mkDerivation (finalAttrs: { + name = "hypre"; + version = "2.31.0"; + + src = fetchFromGitHub { + owner = "hypre-space"; + repo = "hypre"; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-eFOyM3IzQUNm7cSnORA3NrKYotEBmLKC8mi+fcwPMQA="; + }; + + sourceRoot = "${finalAttrs.src.name}/src"; + + buildInputs = [ mpi ]; + + configureFlags = [ + "--enable-mpi" + "--enable-shared" + ]; + + preBuild = '' + makeFlagsArray+=(AR="ar -rcu") + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/{include,lib} + cp -r hypre/include/* $out/include + cp -r hypre/lib/* $out/lib + runHook postInstall + ''; + + meta = with lib; { + description = "Parallel solvers for sparse linear systems featuring multigrid methods."; + homepage = "https://computing.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods"; + platforms = platforms.unix; + license = licenses.mit; + maintainers = with maintainers; [ mkez ]; + }; +}) |