nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, cython
4, ninja
5, setuptools-scm
6, setuptools
7, fetchPypi
8, gn
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "skia-pathops";
14 version = "0.7.2";
15
16 src = fetchPypi {
17 pname = "skia-pathops";
18 inherit version;
19 extension = "zip";
20 sha256 = "sha256-Gdhcmv77oVr5KxPIiJlk935jgvWPQsYEC0AZ6yjLppA=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "build_cmd = [sys.executable, build_skia_py, build_dir]" \
26 'build_cmd = [sys.executable, build_skia_py, "--no-fetch-gn", "--no-virtualenv", "--gn-path", "${gn}/bin/gn", build_dir]'
27 '';
28
29 nativeBuildInputs = [ cython ninja setuptools-scm ];
30
31 propagatedBuildInputs = [ setuptools ];
32
33 checkInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "pathops" ];
36
37 meta = {
38 description = "Python access to operations on paths using the Skia library";
39 homepage = "https://skia.org/dev/present/pathops";
40 license = lib.licenses.bsd3;
41 maintainers = [ lib.maintainers.BarinovMaxim ];
42 };
43}