From e3b2cfa523cf588edf83459b23d62af8b3f1c845 Mon Sep 17 00:00:00 2001 From: qbisi Date: Tue, 18 Mar 2025 19:20:29 +0800 Subject: [PATCH] petsc: patch shebang in template string of example_template.py This patch does not fix the shebang at the begining of the example_template.py file. It only replaces the shebang in the template string of that file. --- pkgs/by-name/pe/petsc/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/pe/petsc/package.nix b/pkgs/by-name/pe/petsc/package.nix index cb9470b47428..8e0abca000e2 100644 --- a/pkgs/by-name/pe/petsc/package.nix +++ b/pkgs/by-name/pe/petsc/package.nix @@ -11,6 +11,7 @@ zlib, # propagated by p4est but required by petsc mpi, # generic mpi dependency mpiCheckPhaseHook, + bash, # Build options petsc-optimized ? true, @@ -99,6 +100,9 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs ./lib/petsc/bin + + substituteInPlace config/example_template.py \ + --replace-fail "/usr/bin/env bash" "${bash}/bin/bash" ''; configureFlags =