Unverified Commit ddc440f3 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

petsc: 3.23.7 -> 3.24.0; slepc: 3.23.3 -> 3.24.0 (#448943)

parents ff1371d8 fc849aad
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -110,13 +110,26 @@ let
in
stdenv.mkDerivation (finalAttrs: {
  pname = "petsc";
  version = "3.23.7";
  version = "3.24.0";

  src = fetchzip {
    url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${finalAttrs.version}.tar.gz";
    hash = "sha256-6jP1EEYGMkttmEh0Fvtm0Fgp0NwHQlG21fY7cnLmXTI=";
    hash = "sha256-5jqYTo5sfwLNByOlpry0zpI+q3u7ErwJJ97h7w5bvNQ=";
  };

  patches = [
    (replaceVars ./fix-petsc4py-install-prefix.patch {
      PYTHON_SITEPACKAGES = python3Packages.python.sitePackages;
    })
  ];

  postPatch = ''
    patchShebangs ./lib/petsc/bin

    substituteInPlace config/example_template.py \
      --replace-fail "/usr/bin/env bash" "${bash}/bin/bash"
  '';

  strictDeps = true;

  nativeBuildInputs = [
@@ -151,19 +164,6 @@ stdenv.mkDerivation (finalAttrs: {

  propagatedBuildInputs = lib.optional pythonSupport python3Packages.numpy;

  patches = [
    (replaceVars ./fix-petsc4py-install-prefix.patch {
      PYTHON_SITEPACKAGES = python3Packages.python.sitePackages;
    })
  ];

  postPatch = ''
    patchShebangs ./lib/petsc/bin

    substituteInPlace config/example_template.py \
      --replace-fail "/usr/bin/env bash" "${bash}/bin/bash"
  '';

  configureFlags = [
    "--with-blaslapack=1"
    "--with-scalar-type=${scalarType}"
+3 −11
Original line number Diff line number Diff line
@@ -15,13 +15,13 @@ assert petsc.mpiSupport;
assert pythonSupport -> petsc.pythonSupport;
stdenv.mkDerivation (finalAttrs: {
  pname = "slepc";
  version = "3.23.3";
  version = "3.24.0";

  src = fetchFromGitLab {
    owner = "slepc";
    repo = "slepc";
    tag = "v${finalAttrs.version}";
    hash = "sha256-j0sUJet4eViFxOR0XOAxNSprnL+kN4OW1npGihT0Q4Y=";
    hash = "sha256-nvzX0p/H3EYR8+7jD+I4FdvU+WstxR/U4Upcn7yZULk=";
  };

  postPatch = ''
@@ -33,14 +33,6 @@ stdenv.mkDerivation (finalAttrs: {
    patchShebangs lib/slepc/bin
  '';

  # Usually this project is being built as part of a `petsc` build or as part of
  # other projects, e.g when `petsc` is `./configure`d with
  # `--download-slepc=1`. This instructs the slepc to be built as a standalone
  # project.
  preConfigure = ''
    export SLEPC_DIR=$PWD
  '';

  nativeBuildInputs = [
    python3Packages.python
  ]
@@ -99,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: {
  meta = {
    description = "Scalable Library for Eigenvalue Problem Computations";
    homepage = "https://slepc.upv.es";
    changelog = "https://gitlab.com/slepc/slepc/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    changelog = "https://gitlab.com/slepc/slepc/blob/v${finalAttrs.version}/CHANGELOG.md";
    license = with lib.licenses; [
      bsd2
    ];