firedrake: Moved to new overlay system and shared sub-scope

Firedrake contains a ton of inter-connected dependencies, many of
which are either firedrake specific or forked versions of upstream
packages.  Cleaner to create a firedrake sub-scope for all these.
This commit is contained in:
Tyson Whitehead
2018-01-18 00:17:48 -05:00
parent d4dd6ff700
commit 8dda256fad
28 changed files with 373 additions and 372 deletions

45
pkgs/firedrake/pyop2.nix Normal file
View File

@@ -0,0 +1,45 @@
{ lib, callPackage, fetchFromGitHub, pythonPackages
, openmpi
, coffee, petsc, petsc4py, mpi4py }:
pythonPackages.buildPythonPackage rec {
version = "98aab7bbbab2945317c1b9ecf5885652cf20e709";
name = "PyOP2-${version}";
src = fetchFromGitHub {
owner = "OP2";
repo = "PyOP2";
rev = "${version}";
sha256 = "1hw8wpbfgw8j48jfhv72pxq33as2mkw9a9k2qg0607d77agjmpz5";
};
buildInputs = [
openmpi
pythonPackages.cython
pythonPackages.pytest
pythonPackages.flake8
pythonPackages.pycparser
petsc
];
propagatedBuildInputs = [
pythonPackages.six
pythonPackages.numpy
pythonPackages.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 = with lib; {
homepage = "http://op2.github.io/PyOP2/";
description = "Framework for performance-portable parallel computations on unstructured meshes.";
license = licenses.bsd3;
};
}