18 buildPythonPackage rec {
19 pname = "skia-pathops";
20 version = "0.8.0.post1";
21 format = "setuptools";
24 pname = "skia-pathops";
27 hash = "sha256-oFYkneL2H6VRFrnuVVE8aja4eK7gDJFFDkBNFgZIXLs=";
32 substituteInPlace setup.py \
33 --replace "build_cmd = [sys.executable, build_skia_py, build_dir]" \
34 'build_cmd = [sys.executable, build_skia_py, "--no-fetch-gn", "--no-virtualenv", "--gn-path", "${gn}/bin/gn", build_dir]'
36 + lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
37 substituteInPlace src/cpp/skia-builder/skia/gn/skia/BUILD.gn \
38 --replace "-march=armv7-a" "-march=armv8-a" \
39 --replace "-mfpu=neon" "" \
40 --replace "-mthumb" ""
41 substituteInPlace src/cpp/skia-builder/skia/src/core/SkOpts.cpp \
42 --replace "defined(SK_CPU_ARM64)" "0"
45 lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) # old compiler?
48 --- a/src/cpp/skia-builder/skia/include/private/base/SkTArray.h
49 +++ b/src/cpp/skia-builder/skia/include/private/base/SkTArray.h
51 - static constexpr int kMaxCapacity = SkToInt(std::min(SIZE_MAX / sizeof(T), (size_t)INT_MAX));
52 + static constexpr int kMaxCapacity = SkToInt(std::min<size_t>(SIZE_MAX / sizeof(T), (size_t)INT_MAX));
60 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcodebuild ];
62 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
67 propagatedBuildInputs = [ setuptools ];
69 nativeCheckInputs = [ pytestCheckHook ];
71 pythonImportsCheck = [ "pathops" ];
74 description = "Python access to operations on paths using the Skia library";
75 homepage = "https://github.com/fonttools/skia-pathops";
76 license = lib.licenses.bsd3;
77 maintainers = [ lib.maintainers.BarinovMaxim ];
78 # ERROR at //gn/BUILDCONFIG.gn:87:14: Script returned non-zero exit code.