667d42c00d
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev 57b193d8dd
result/bin/apply-formatting $NIXPKGS_PATH
67 lines
1.4 KiB
Nix
67 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
meson,
|
|
ninja,
|
|
buildPythonPackage,
|
|
pytest,
|
|
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";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://github.com/pygobject/pycairo/commit/678edd94d8a6dfb5d51f9c3549e6ee8c90a73744.patch";
|
|
sha256 = "sha256-HmP69tUGYxZvJ/M9FJHwHTCjb9Kf4aWRyMT4wSymrT0=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
cairo
|
|
];
|
|
|
|
# HACK: Don't use the pytestCheckHook because PYTHONPATH
|
|
# will be added by the Python setuptook breaking meson.
|
|
checkPhase = ''
|
|
${pytest}/bin/pytest
|
|
'';
|
|
|
|
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.pythonOnBuildForHost.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;
|
|
};
|
|
}
|