17 buildPythonPackage rec {
18 pname = "skia-pathops";
19 version = "0.8.0.post1";
20 format = "setuptools";
23 pname = "skia-pathops";
26 hash = "sha256-oFYkneL2H6VRFrnuVVE8aja4eK7gDJFFDkBNFgZIXLs=";
30 substituteInPlace setup.py \
31 --replace "build_cmd = [sys.executable, build_skia_py, build_dir]" \
32 'build_cmd = [sys.executable, build_skia_py, "--no-fetch-gn", "--no-virtualenv", "--gn-path", "${gn}/bin/gn", build_dir]'
33 '' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
34 substituteInPlace src/cpp/skia-builder/skia/gn/skia/BUILD.gn \
35 --replace "-march=armv7-a" "-march=armv8-a" \
36 --replace "-mfpu=neon" "" \
37 --replace "-mthumb" ""
38 substituteInPlace src/cpp/skia-builder/skia/src/core/SkOpts.cpp \
39 --replace "defined(SK_CPU_ARM64)" "0"
40 '' + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) /* old compiler? */ ''
42 --- a/src/cpp/skia-builder/skia/include/private/base/SkTArray.h
43 +++ b/src/cpp/skia-builder/skia/include/private/base/SkTArray.h
45 - static constexpr int kMaxCapacity = SkToInt(std::min(SIZE_MAX / sizeof(T), (size_t)INT_MAX));
46 + static constexpr int kMaxCapacity = SkToInt(std::min<size_t>(SIZE_MAX / sizeof(T), (size_t)INT_MAX));
50 nativeBuildInputs = [ cython ninja setuptools-scm ]
51 ++ lib.optionals stdenv.isDarwin [ xcodebuild ];
53 buildInputs = lib.optionals stdenv.isDarwin [ ApplicationServices OpenGL ];
55 propagatedBuildInputs = [ setuptools ];
57 nativeCheckInputs = [ pytestCheckHook ];
59 pythonImportsCheck = [ "pathops" ];
62 description = "Python access to operations on paths using the Skia library";
63 homepage = "https://github.com/fonttools/skia-pathops";
64 license = lib.licenses.bsd3;
65 maintainers = [ lib.maintainers.BarinovMaxim ];
66 # ERROR at //gn/BUILDCONFIG.gn:87:14: Script returned non-zero exit code.