python3Packages.wandb: fix x86_64-darwin

This commit is contained in:
Niklas Korz
2025-05-18 21:30:24 +02:00
parent 49b6072f10
commit 7924c28ad9
@@ -7,6 +7,7 @@
buildGoModule,
git,
versionCheckHook,
fetchpatch2,
## gpu-stats
rustPlatform,
@@ -118,6 +119,23 @@ let
sourceRoot = "${src.name}/core";
# x86_64-darwin fails with:
# "link: duplicated definition of symbol dlopen, from github.com/ebitengine/purego and github.com/ebitengine/purego"
# This is fixed in purego 0.8.3, but wandb-core uses 0.8.2, so we pull in the fix here.
patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
(fetchpatch2 {
url = "https://github.com/ebitengine/purego/commit/1638563e361522e5f63511d84c4541ae1c5fd704.patch";
stripLen = 1;
extraPrefix = "vendor/github.com/ebitengine/purego/";
# These are not vendored by wandb-core
excludes = [
"vendor/github.com/ebitengine/purego/.github/workflows/test.yml"
"vendor/github.com/ebitengine/purego/internal/fakecgo/gen.go"
];
hash = "sha256-GoT/OL6r3rJY5zoUyl3kGzSRpX3PoI7Yjpe7oRb0cFc=";
})
];
# hardcode the `gpu_stats` binary path.
postPatch = ''
substituteInPlace pkg/monitor/gpuresourcemanager.go \