Skip to content

Commit

Permalink
python3.pkgs.pycairo: clean up
Browse files Browse the repository at this point in the history
* drop unneeded xlibs dependency
* correct license
* do not use pkgconfig alias
* use pytestCheckHook
* format
  • Loading branch information
jtojnar committed Oct 19, 2020
1 parent a5f89fc commit 17739fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions pkgs/development/python-modules/pycairo/default.nix
@@ -1,4 +1,13 @@
{ lib, fetchFromGitHub, meson, ninja, buildPythonPackage, pytest, pkgconfig, cairo, xlibsWrapper, isPy3k }:
{ lib
, fetchFromGitHub
, meson
, ninja
, buildPythonPackage
, pytestCheckHook
, pkg-config
, cairo
, isPy3k
}:

buildPythonPackage rec {
pname = "pycairo";
Expand All @@ -16,22 +25,25 @@ buildPythonPackage rec {
nativeBuildInputs = [
meson
ninja
pkgconfig
pkg-config
];

buildInputs = [
cairo
xlibsWrapper
];

checkInputs = [ pytest ];
checkInputs = [
pytestCheckHook
];

mesonFlags = [ "-Dpython=${if isPy3k then "python3" else "python"}" ];
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 ];
license = with licenses; [ lgpl21Only mpl11 ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/python-packages.nix
Expand Up @@ -4814,7 +4814,7 @@ in {

pybullet = callPackage ../development/python-modules/pybullet { };

pycairo = callPackage ../development/python-modules/pycairo { inherit (pkgs) meson pkgconfig; };
pycairo = callPackage ../development/python-modules/pycairo { inherit (pkgs) meson pkg-config; };

pycallgraph = callPackage ../development/python-modules/pycallgraph { };

Expand Down

0 comments on commit 17739fa

Please sign in to comment.