diff options
author | Alexander Ried <ried@mytum.de> | 2016-04-26 23:28:39 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2016-04-29 02:32:03 +0200 |
commit | cf8261135121cc4080d0fcc5024baba4df5e7235 (patch) | |
tree | 8981a952e133c9884cf73e05cee08f7ea10937bc /pkgs/development/python-modules | |
parent | d01fd52b8fbcebb83afe4e9fab78d4c4cad84c08 (diff) |
pycairo: enable for python35
The patch was taken from FreeBSD, it is also used on debian. see:
https://svnweb.freebsd.org/ports/head/graphics/py3-cairo/files/pycairo-1.10.0-waf-py3_5.patch?revision=401900&view=markup
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r-- | pkgs/development/python-modules/pycairo/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/python-modules/pycairo/waf-py3_5.patch | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/pycairo/default.nix b/pkgs/development/python-modules/pycairo/default.nix index 84dfdd32a100..433eb9d6b2a4 100644 --- a/pkgs/development/python-modules/pycairo/default.nix +++ b/pkgs/development/python-modules/pycairo/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, xlibsWrapper, isPyPy, isPy35 }: -if (isPyPy || isPy35) then throw "pycairo not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { +if (isPyPy) then throw "pycairo not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { version = "1.10.0"; name = "${python.libPrefix}-pycairo-${version}"; src = if python.is_py3k or false @@ -23,6 +23,8 @@ if (isPyPy || isPy35) then throw "pycairo not supported for interpreter ${python sha256 = "0xfl1i9dips2nykyg91f5h5r3xpk2hp1js1gq5z0hwjr0in55id4"; }; + patch_waf-py3_5 = ./waf-py3_5.patch; + buildInputs = [ python pkgconfig cairo xlibsWrapper ]; configurePhase = '' @@ -30,6 +32,7 @@ if (isPyPy || isPy35) then throw "pycairo not supported for interpreter ${python cd $(${python.executable} waf unpack) pwd patch -p1 < ${patch_waf} + ${stdenv.lib.optionalString isPy35 "patch -p1 < ${patch_waf-py3_5}"} ) ${python.executable} waf configure --prefix=$out diff --git a/pkgs/development/python-modules/pycairo/waf-py3_5.patch b/pkgs/development/python-modules/pycairo/waf-py3_5.patch new file mode 100644 index 000000000000..dcfdbea2fbdc --- /dev/null +++ b/pkgs/development/python-modules/pycairo/waf-py3_5.patch @@ -0,0 +1,10 @@ +--- a/waflib/Build.py ++++ b/waflib/Build.py +@@ -151,6 +151,7 @@ class BuildContext(Context.Context): + f.close() + self.init_dirs() + def store(self): ++ return + data={} + for x in SAVED_ATTRS: + data[x]=getattr(self,x) |