diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-10 07:13:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-12 14:07:16 +0000 |
commit | e2698550456abba83c6dcd5d5e5a9990a0b96f8a (patch) | |
tree | 79a56f0df3fa55e470d84b4dff6059fbf487ec18 /nixpkgs/pkgs/development/libraries/science/math/petsc | |
parent | 1cdc42df888dc98c347e03bd942ed9825a55bcb3 (diff) | |
parent | 84d74ae9c9cbed73274b8e4e00be14688ffc93fe (diff) | |
download | nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.gz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.bz2 nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.lz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.xz nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.tar.zst nixlib-e2698550456abba83c6dcd5d5e5a9990a0b96f8a.zip |
Merge commit '84d74ae9c9cbed73274b8e4e00be14688ffc93fe'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math/petsc')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix b/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix index 6eeeda9e9284..82a0d063570d 100644 --- a/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix +++ b/nixpkgs/pkgs/development/libraries/science/math/petsc/default.nix @@ -1,28 +1,38 @@ -{ stdenv , fetchurl , blas , gfortran , lapack , python }: +{ stdenv , darwin , fetchurl , blas , gfortran , lapack , python }: stdenv.mkDerivation rec { pname = "petsc"; - version = "3.13.1"; + version = "3.13.4"; src = fetchurl { url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz"; - sha256 = "0pr604b9pnryl9q0q5arlhs0xdx7wslca0sbz0pzs9qylmz775qp"; + sha256 = "1n2paqw5c0ja392s1qhp7q2ypwav8s5drxxz2w5m2cn31vbspy1c"; }; - nativeBuildInputs = [ blas gfortran.cc.lib lapack python ]; + nativeBuildInputs = [ blas gfortran gfortran.cc.lib lapack python ]; - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + # 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 + '' + stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace config/install.py \ - --replace /usr/bin/install_name_tool install_name_tool + --replace /usr/bin/install_name_tool ${darwin.cctools}/bin/install_name_tool ''; preConfigure = '' + export FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran" patchShebangs . configureFlagsArray=( $configureFlagsArray "--CC=$CC" "--with-cxx=$CXX" - "--with-fc=0" + "--with-fc=$FC" "--with-mpi=0" "--with-blas-lib=[${blas}/lib/libblas.so,${gfortran.cc.lib}/lib/libgfortran.a]" "--with-lapack-lib=[${lapack}/lib/liblapack.so,${gfortran.cc.lib}/lib/libgfortran.a]" |