mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
afaee01ed3
Close #1802.
24 lines
841 B
Nix
24 lines
841 B
Nix
{ stdenv, fetchurl, python, pkgconfig, cairo, x11 }:
|
|
|
|
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";
|
|
}
|