Commit 61ca0b5a authored by qbisi's avatar qbisi
Browse files
parent 2e75bc87
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}"