summary refs log tree commit diff
path: root/pkgs/development/libraries/science
diff options
context:
space:
mode:
authorCarsten Burstedde <burstedde@ins.uni-bonn.de>2021-07-06 23:10:19 +0200
committerCarsten Burstedde <burstedde@ins.uni-bonn.de>2021-07-06 23:10:19 +0200
commitcf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593 (patch)
tree626d39a3b75fa04c82489a0b7756518f235beb36 /pkgs/development/libraries/science
parent80697bfb8e32b9169ee6db4079dff88da733c0f9 (diff)
downloadnixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.tar
nixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.tar.gz
nixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.tar.bz2
nixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.tar.lz
nixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.tar.xz
nixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.tar.zst
nixpkgs-cf4b4bdbeafdae01ba309b0fc3cbba7aa3df1593.zip
petsc: specify python3 and remove unneeded patch
Diffstat (limited to 'pkgs/development/libraries/science')
-rw-r--r--pkgs/development/libraries/science/math/petsc/default.nix16
1 files changed, 4 insertions, 12 deletions
diff --git a/pkgs/development/libraries/science/math/petsc/default.nix b/pkgs/development/libraries/science/math/petsc/default.nix
index 3fed81fa34a..ee495deedc1 100644
--- a/pkgs/development/libraries/science/math/petsc/default.nix
+++ b/pkgs/development/libraries/science/math/petsc/default.nix
@@ -3,7 +3,7 @@
 , fetchurl
 , darwin
 , gfortran
-, python
+, python3
 , blas
 , lapack
 , mpi                   # generic mpi dependency
@@ -28,23 +28,14 @@ stdenv.mkDerivation rec {
   mpiSupport = !withp4est || p4est.mpiSupport;
   withp4est = petsc-withp4est;
 
-  nativeBuildInputs = [ python gfortran ];
+  nativeBuildInputs = [ python3 gfortran ];
   buildInputs = [ blas lapack ]
     ++ lib.optional mpiSupport mpi
     ++ lib.optional (mpiSupport && mpi.pname == "openmpi") openssh
     ++ lib.optional withp4est p4est
   ;
 
-  # Upstream does some hot she-py-bang stuff, this change streamlines that
-  # process. The original script in upstream is both a shell script and a
-  # python script, where the shellscript just finds a suitable python
-  # interpreter to execute the python script. See
-  # https://github.com/NixOS/nixpkgs/pull/89299#discussion_r450203444
-  # for more details.
-  prePatch = ''
-    substituteInPlace configure \
-      --replace /bin/sh /usr/bin/python
-  '' + lib.optionalString stdenv.isDarwin ''
+  prePatch = lib.optionalString stdenv.isDarwin ''
     substituteInPlace config/install.py \
       --replace /usr/bin/install_name_tool ${darwin.cctools}/bin/install_name_tool
   '';
@@ -71,6 +62,7 @@ stdenv.mkDerivation rec {
       "--with-lapack=1"
     )
   '';
+
   configureScript = "python ./configure";
 
   enableParallelBuilding = true;