pycairo: Update to 1.10.0 and support both python 2 and python 3
Close #1802.
This commit is contained in:
parent
f21abed131
commit
afaee01ed3
@ -1,11 +1,24 @@
|
|||||||
{ stdenv, fetchurl, python, pkgconfig, cairo, x11 }:
|
{ stdenv, fetchurl, python, pkgconfig, cairo, x11 }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "pycairo-1.8.8";
|
version = "1.10.0";
|
||||||
src = fetchurl {
|
name = "pycairo-${version}";
|
||||||
url = http://cairographics.org/releases/pycairo-1.8.8.tar.gz;
|
src = if python.is_py3k or false
|
||||||
sha256 = "0q18hd4ai4raljlvd76ylgi30kxpr2qq83ka6gzwh0ya8fcmjlig";
|
then fetchurl {
|
||||||
};
|
url = "http://cairographics.org/releases/pycairo-${version}.tar.bz2";
|
||||||
|
sha256 = "1gjkf8x6hyx1skq3hhwcbvwifxvrf9qxis5vx8x5igmmgs70g94s";
|
||||||
|
}
|
||||||
|
else fetchurl {
|
||||||
|
url = "http://cairographics.org/releases/py2cairo-${version}.tar.bz2";
|
||||||
|
sha256 = "0cblk919wh6w0pgb45zf48xwxykfif16qk264yga7h9fdkq3j16k";
|
||||||
|
};
|
||||||
|
|
||||||
buildInputs = [ python pkgconfig cairo x11 ];
|
buildInputs = [ python pkgconfig cairo x11 ];
|
||||||
|
preConfigure = ''
|
||||||
|
sed -e 's@#!/usr/bin/env python@#!${python.executable}@' -i waf
|
||||||
|
head waf
|
||||||
|
'';
|
||||||
|
configurePhase = "${python.executable} waf configure --prefix=$out";
|
||||||
|
buildPhase = "${python.executable} waf";
|
||||||
|
installPhase = "${python.executable} waf install";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user