1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 02:24:27 +00:00
nixpkgs/pkgs/development/python-modules/pycairo/default.nix
2019-11-05 09:40:25 -08:00

40 lines
854 B
Nix

{ lib, fetchFromGitHub, meson, ninja, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPy33, isPy3k }:
buildPythonPackage rec {
pname = "pycairo";
version = "1.18.2";
format = "other";
disabled = isPy33;
src = fetchFromGitHub {
owner = "pygobject";
repo = "pycairo";
rev = "v${version}";
sha256 = "142145a2whvlk92jijrbf3i2bqrzmspwpysj0bfypw0krzi0aa6j";
};
nativeBuildInputs = [
meson
ninja
pkgconfig
];
buildInputs = [
cairo
xlibsWrapper
];
checkInputs = [ pytest ];
mesonFlags = [ "-Dpython=${if isPy3k then "python3" else "python"}" ];
meta = with lib; {
description = "Python 2/3 bindings for cairo";
homepage = https://pycairo.readthedocs.io/;
license = with licenses; [ lgpl2 mpl11 ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}