petsc: init at 3.7.6 (#28368)
* petsc: init at 3.7.6 * petsc: use configureFlagsArray * petsc: Remove unneeded binaries
This commit is contained in:
parent
4521225d22
commit
c8c0cd4d6c
45
pkgs/development/libraries/science/math/petsc/default.nix
Normal file
45
pkgs/development/libraries/science/math/petsc/default.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, blas
|
||||
, gfortran
|
||||
, liblapack
|
||||
, python }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "petsc-${version}";
|
||||
version = "3.7.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz";
|
||||
sha256 = "0jfl35lrhzvv982z6h1v5rcp39g0x16ca43rm9dx91wm6i8y13iw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ blas gfortran.cc.lib liblapack python ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
configureFlagsArray=(
|
||||
$configureFlagsArray
|
||||
"--CC=$CC"
|
||||
"--with-cxx=0"
|
||||
"--with-fc=0"
|
||||
"--with-mpi=0"
|
||||
"--with-blas-lib=[${blas}/lib/libblas.a,${gfortran.cc.lib}/lib/libgfortran.a]"
|
||||
"--with-lapack-lib=[${liblapack}/lib/liblapack.a,${gfortran.cc.lib}/lib/libgfortran.a]"
|
||||
)
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm $out/bin/petscmpiexec
|
||||
rm $out/bin/popup
|
||||
rm $out/bin/uncrustify.cfg
|
||||
rm -rf $out/bin/win32fe
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Library of linear algebra algorithms for solving partial differential equations";
|
||||
homepage = https://www.mcs.anl.gov/petsc/index.html;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
};
|
||||
}
|
@ -18105,6 +18105,8 @@ with pkgs;
|
||||
|
||||
nauty = callPackage ../applications/science/math/nauty {};
|
||||
|
||||
petsc = callPackage ../development/libraries/science/math/petsc { };
|
||||
|
||||
sage = callPackage ../applications/science/math/sage { };
|
||||
|
||||
suitesparse_4_2 = callPackage ../development/libraries/science/math/suitesparse/4.2.nix { };
|
||||
|
Loading…
Reference in New Issue
Block a user