mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
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.mkDerivation {
|
||||
name = "pycairo-1.8.8";
|
||||
src = fetchurl {
|
||||
url = http://cairographics.org/releases/pycairo-1.8.8.tar.gz;
|
||||
sha256 = "0q18hd4ai4raljlvd76ylgi30kxpr2qq83ka6gzwh0ya8fcmjlig";
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.10.0";
|
||||
name = "pycairo-${version}";
|
||||
src = if python.is_py3k or false
|
||||
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 ];
|
||||
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…
Reference in New Issue
Block a user