53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
with import <nixpkgs> {};
|
|
|
|
let
|
|
|
|
mpi4py = import ./mpi4py.nix;
|
|
coffee = import ./coffee.nix;
|
|
petsc = import ./petsc.nix;
|
|
petsc4py = import ./petsc4py.nix;
|
|
|
|
in
|
|
|
|
python27Packages.buildPythonPackage rec {
|
|
version = "98aab7bbbab2945317c1b9ecf5885652cf20e709";
|
|
name = "PyOP2-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "OP2";
|
|
repo = "PyOP2";
|
|
rev = "${version}";
|
|
sha256 = "167yl4vmw8r9pbn7issjvpflhisjnn42dnw6rfz6bp1rw9v4n4md";
|
|
};
|
|
|
|
buildInputs = [
|
|
openmpi
|
|
python27Packages.cython
|
|
python27Packages.pytest
|
|
python27Packages.flake8
|
|
python27Packages.pycparser
|
|
petsc
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
python27Packages.six
|
|
python27Packages.numpy
|
|
python27Packages.decorator
|
|
mpi4py
|
|
coffee
|
|
petsc4py
|
|
];
|
|
|
|
postPatch = ''
|
|
sed -i -e 's|self\._cc = os\.environ\.get(ccenv, cc)|self._cc = '\'"$(type -p mpicxx)"\''' if cpp else '\'"$(type -p mpicc)"\'''|' pyop2/compilation.py
|
|
sed -i -e 's|self\._ld = os\.environ\.get('\'''LDSHARED'\''', ld)|self._ld = None|' pyop2/compilation.py
|
|
sed -i -e 's|os\.environ\['\'''PETSC_DIR'\'''\]|'\'''${petsc}'\'''|' pyop2/utils.py
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "http://op2.github.io/PyOP2/";
|
|
description = "Framework for performance-portable parallel computations on unstructured meshes.";
|
|
license = licenses.bsd3;
|
|
};
|
|
}
|