pycairo: fix for python-3.4 by LFS patches

Fixes #2693.
This commit is contained in:
Vladimír Čunát 2014-05-20 12:42:39 +02:00
parent bddd10d75c
commit e470391988
2 changed files with 21 additions and 6 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python, pkgconfig, cairo, x11 }:
{ stdenv, fetchurl, fetchpatch, python, pkgconfig, cairo, x11 }:
stdenv.mkDerivation rec {
version = "1.10.0";
@ -13,12 +13,27 @@ stdenv.mkDerivation rec {
sha256 = "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k";
};
patches = [(fetchpatch {
url = http://www.linuxfromscratch.org/patches/blfs/svn/pycairo-1.10.0-waf_unpack-1.patch;
sha256 = "1bmrhq2nmhx4l5glvyi59r0hc7w5m56kz41frx7v3dcp8f91p7xd";
})];
patch_waf = fetchpatch {
url = http://www.linuxfromscratch.org/patches/blfs/svn/pycairo-1.10.0-waf_python_3_4-1.patch;
sha256 = "0xfl1i9dips2nykyg91f5h5r3xpk2hp1js1gq5z0hwjr0in55id4";
};
buildInputs = [ python pkgconfig cairo x11 ];
preConfigure = ''
sed -e 's@#!/usr/bin/env python@#!${python.executable}@' -i waf
head waf
configurePhase = ''
(
cd $(${python.executable} waf unpack)
pwd
patch -p1 < ${patch_waf}
)
${python.executable} waf configure --prefix=$out
'';
configurePhase = "${python.executable} waf configure --prefix=$out";
buildPhase = "${python.executable} waf";
installPhase = "${python.executable} waf install";
}

View File

@ -100,7 +100,7 @@ rec {
};
pycairo = import ../development/python-modules/pycairo {
inherit (pkgs) stdenv fetchurl pkgconfig cairo x11;
inherit (pkgs) stdenv fetchurl fetchpatch pkgconfig cairo x11;
inherit python;
};