git.iko.soy/typeable/nixpkgs
on master help sign in
petsc: init at 3.7.6 (#28368)

* petsc: init at 3.7.6 * petsc: use configureFlagsArray * petsc: Remove unneeded binaries

commitc8c0cd4d6c14ef4868156648c6b06cfa0220cbf1 authorjamtrott <james.trotter@gmail.com> dateSun 3 Sep 2017, 18:11 (9 years ago) parent4521225
2 files changed+47
pkgs/development/libraries/science/math/petsc/default.nix+45 pkgs/top-level/all-packages.nix+2
pkgs/development/libraries/science/math/petsc/default.nixnew file+45
@@ -0,0 +1,45 @@
1+{ stdenv
2+, fetchurl
3+, blas
4+, gfortran
5+, liblapack
6+, python }:
7+
8+stdenv.mkDerivation rec {
9+ name = "petsc-${version}";
10+ version = "3.7.6";
11+
12+ src = fetchurl {
13+ url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-${version}.tar.gz";
14+ sha256 = "0jfl35lrhzvv982z6h1v5rcp39g0x16ca43rm9dx91wm6i8y13iw";
15+ };
16+
17+ nativeBuildInputs = [ blas gfortran.cc.lib liblapack python ];
18+
19+ preConfigure = ''
20+ patchShebangs .
21+ configureFlagsArray=(
22+ $configureFlagsArray
23+ "--CC=$CC"
24+ "--with-cxx=0"
25+ "--with-fc=0"
26+ "--with-mpi=0"
27+ "--with-blas-lib=[${blas}/lib/libblas.a,${gfortran.cc.lib}/lib/libgfortran.a]"
28+ "--with-lapack-lib=[${liblapack}/lib/liblapack.a,${gfortran.cc.lib}/lib/libgfortran.a]"
29+ )
30+ '';
31+
32+ postInstall = ''
33+ rm $out/bin/petscmpiexec
34+ rm $out/bin/popup
35+ rm $out/bin/uncrustify.cfg
36+ rm -rf $out/bin/win32fe
37+ '';
38+
39+ meta = {
40+ description = "Library of linear algebra algorithms for solving partial differential equations";
41+ homepage = https://www.mcs.anl.gov/petsc/index.html;
42+ platforms = stdenv.lib.platforms.all;
43+ license = stdenv.lib.licenses.bsd2;
44+ };
45+}
pkgs/top-level/all-packages.nix+2
@@ -18105,6 +18105,8 @@ with pkgs;
1810518105
1810618106 nauty = callPackage ../applications/science/math/nauty {};
1810718107
18108+ petsc = callPackage ../development/libraries/science/math/petsc { };
18109+
1810818110 sage = callPackage ../applications/science/math/sage { };
1810918111
1811018112 suitesparse_4_2 = callPackage ../development/libraries/science/math/suitesparse/4.2.nix { };