1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/pycairo/default.nix

29 lines
820 B
Nix
Raw Normal View History

{ lib, fetchFromGitHub, python, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPyPy }:
buildPythonPackage rec {
pname = "pycairo";
version = "1.15.4";
name = "${pname}-${version}";
disabled = isPyPy;
src = fetchFromGitHub {
owner = "pygobject";
repo = "pycairo";
rev = "v${version}";
sha256 = "02vzmfxx8nl6dbwzc911wcj7hqspgqz6v9xmq6579vwfla0vaglv";
};
postPatch = ''
# we are unable to pass --prefix to bdist_wheel
# see https://github.com/NixOS/nixpkgs/pull/32034#discussion_r153285955
substituteInPlace setup.py --replace '"prefix": self.install_base' "'prefix': '$out'"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python cairo xlibsWrapper ];
checkInputs = [ pytest ];
2015-11-08 07:21:58 +00:00
2016-08-31 10:01:16 +01:00
meta.platforms = lib.platforms.linux ++ lib.platforms.darwin;
}