2020-03-31 07:47:18 -07:00
|
|
|
{ stdenv , fetchurl , blas , gfortran , lapack , python }:
|
2017-09-03 09:11:16 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "petsc";
|
2020-05-08 08:57:25 -07:00
|
|
|
version = "3.13.1";
|
2017-09-03 09:11:16 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz";
|
2020-05-08 08:57:25 -07:00
|
|
|
sha256 = "0pr604b9pnryl9q0q5arlhs0xdx7wslca0sbz0pzs9qylmz775qp";
|
2017-09-03 09:11:16 -07:00
|
|
|
};
|
|
|
|
|
2020-03-31 07:47:18 -07:00
|
|
|
nativeBuildInputs = [ blas gfortran.cc.lib lapack python ];
|
2017-09-03 09:11:16 -07:00
|
|
|
|
2018-03-11 16:20:18 -07:00
|
|
|
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace config/install.py \
|
|
|
|
--replace /usr/bin/install_name_tool install_name_tool
|
|
|
|
'';
|
|
|
|
|
2017-09-03 09:11:16 -07:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs .
|
|
|
|
configureFlagsArray=(
|
|
|
|
$configureFlagsArray
|
|
|
|
"--CC=$CC"
|
2020-04-06 05:00:00 -07:00
|
|
|
"--with-cxx=$CXX"
|
2017-09-03 09:11:16 -07:00
|
|
|
"--with-fc=0"
|
|
|
|
"--with-mpi=0"
|
2020-03-31 07:47:18 -07:00
|
|
|
"--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]"
|
2017-09-03 09:11:16 -07:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2020-02-15 08:12:04 -08:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = ''
|
|
|
|
Library of linear algebra algorithms for solving partial differential
|
|
|
|
equations
|
|
|
|
'';
|
|
|
|
homepage = "https://www.mcs.anl.gov/petsc/index.html";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ wucke13 ];
|
|
|
|
platforms = platforms.all;
|
2017-09-03 09:11:16 -07:00
|
|
|
};
|
|
|
|
}
|