diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2022-01-16 07:34:26 +0100 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2022-01-16 10:00:16 +0100 |
commit | ae18d68b6b117528e6cd72325ead36b48562d43f (patch) | |
tree | 9f9d765a7208d5d436184dc3656b164fd0581f7f /pkgs/development/python2-modules/pycairo | |
parent | 2027fb600d891379c53c4762463e65d040359682 (diff) |
python2.pkgs: move expressions into python2-modules/ folder
Another step in further separating python2 from python3.
Diffstat (limited to 'pkgs/development/python2-modules/pycairo')
-rw-r--r-- | pkgs/development/python2-modules/pycairo/default.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/python2-modules/pycairo/default.nix b/pkgs/development/python2-modules/pycairo/default.nix new file mode 100644 index 000000000000..9da4da1479c0 --- /dev/null +++ b/pkgs/development/python2-modules/pycairo/default.nix @@ -0,0 +1,52 @@ +{ lib +, fetchFromGitHub +, meson +, ninja +, buildPythonPackage +, pytestCheckHook +, pkg-config +, cairo +, python +}: + +buildPythonPackage rec { + pname = "pycairo"; + version = "1.18.2"; + + format = "other"; + + src = fetchFromGitHub { + owner = "pygobject"; + repo = "pycairo"; + rev = "v${version}"; + sha256 = "142145a2whvlk92jijrbf3i2bqrzmspwpysj0bfypw0krzi0aa6j"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + cairo + ]; + + checkInputs = [ + pytestCheckHook + ]; + + mesonFlags = [ + # This is only used for figuring out what version of Python is in + # use, and related stuff like figuring out what the install prefix + # should be, but it does need to be able to execute Python code. + "-Dpython=${python.pythonForBuild.interpreter}" + ]; + + meta = with lib; { + description = "Python 2 bindings for cairo"; + homepage = "https://pycairo.readthedocs.io/"; + license = with licenses; [ lgpl21Only mpl11 ]; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + }; +} |