pythonPackages.cairocffi: 0.7.2 → 0.8.0
This commit is contained in:
parent
cd35a39b11
commit
1bdca01ed4
@ -1,5 +1,8 @@
|
|||||||
|
# FIXME: make gdk_pixbuf dependency optional
|
||||||
{ buildPythonPackage
|
{ buildPythonPackage
|
||||||
, fetchurl
|
, fetchPypi
|
||||||
|
, lib
|
||||||
|
, substituteAll
|
||||||
, makeFontsConf
|
, makeFontsConf
|
||||||
, freefont_ttf
|
, freefont_ttf
|
||||||
, pytest
|
, pytest
|
||||||
@ -8,16 +11,16 @@
|
|||||||
, cffi
|
, cffi
|
||||||
, withXcffib ? false, xcffib
|
, withXcffib ? false, xcffib
|
||||||
, python
|
, python
|
||||||
, fetchpatch
|
|
||||||
, glib
|
, glib
|
||||||
, gdk_pixbuf }:
|
, gdk_pixbuf }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
name = "cairocffi-0.7.2";
|
pname = "cairocffi";
|
||||||
|
version = "0.8.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchPypi {
|
||||||
url = "mirror://pypi/c/cairocffi/${name}.tar.gz";
|
inherit pname version;
|
||||||
sha256 = "e42b4256d27bd960cbf3b91a6c55d602defcdbc2a73f7317849c80279feeb975";
|
sha256 = "0i9m3p39g9wrkpjvpawch2qmnmm3cnim7niz3nmmbcp2hrkixwk5";
|
||||||
};
|
};
|
||||||
|
|
||||||
LC_ALL = "en_US.UTF-8";
|
LC_ALL = "en_US.UTF-8";
|
||||||
@ -35,31 +38,21 @@ buildPythonPackage rec {
|
|||||||
py.test $out/${python.sitePackages}
|
py.test $out/${python.sitePackages}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# FIXME: make gdk_pixbuf dependency optional
|
|
||||||
# Happens with 0.7.1 and 0.7.2
|
|
||||||
# OSError: dlopen() failed to load a library: gdk_pixbuf-2.0 / gdk_pixbuf-2.0-0
|
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# This patch from PR substituted upstream
|
# OSError: dlopen() failed to load a library: gdk_pixbuf-2.0 / gdk_pixbuf-2.0-0
|
||||||
(fetchpatch {
|
(substituteAll {
|
||||||
url = "https://github.com/avnik/cairocffi/commit/2266882e263c5efc87350cf016d117b2ec6a1d59.patch";
|
src = ./dlopen-paths.patch;
|
||||||
sha256 = "0gb570z3ivf1b0ixsk526n3h29m8c5rhjsiyam7rr3x80dp65cdl";
|
cairo = cairo.out;
|
||||||
|
glib = glib.out;
|
||||||
|
gdk_pixbuf = gdk_pixbuf.out;
|
||||||
})
|
})
|
||||||
|
|
||||||
./dlopen-paths.patch
|
|
||||||
./fix_test_scaled_font.patch
|
./fix_test_scaled_font.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
meta = with lib; {
|
||||||
# Hardcode cairo library path
|
|
||||||
substituteInPlace cairocffi/__init__.py --subst-var-by cairo ${cairo.out}
|
|
||||||
substituteInPlace cairocffi/__init__.py --subst-var-by glib ${glib.out}
|
|
||||||
substituteInPlace cairocffi/__init__.py --subst-var-by gdk_pixbuf ${gdk_pixbuf.out}
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = https://github.com/SimonSapin/cairocffi;
|
homepage = https://github.com/SimonSapin/cairocffi;
|
||||||
license = "bsd";
|
license = licenses.bsd3;
|
||||||
|
maintainers = with maintainers; [];
|
||||||
description = "cffi-based cairo bindings for Python";
|
description = "cffi-based cairo bindings for Python";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user