···
···
google-cloud-artifact-registry,
···
81
-
version = "0.19.11";
86
-
hash = "sha256-JsciaNN1l3Ldty8dB2meRXWz62JdLRXeG09b7PNrQx4=";
86
+
hash = "sha256-GJk+Q/PY3/jo/yeetYRgqgMdXdYSlGt7Ny1NqdfHF0Q=";
gpu-stats = rustPlatform.buildRustPackage {
sourceRoot = "${src.name}/gpu_stats";
96
-
cargoHash = "sha256-q8csheytw57C6+wPPaANkMkW1Smoo+IViiA6Cdrag4Q=";
96
+
cargoHash = "sha256-iZinowkbBc3nuE0uRS2zLN2y97eCMD1mp/MKVKdnXaE=";
···
nativeInstallCheckInputs = [
106
-
versionCheckProgram = "${placeholder "out"}/bin/gpu_stats";
versionCheckProgramArg = "--version";
···
115
-
wandb-core = buildGoModule rec {
114
+
wandb-core = buildGo125Module rec {
sourceRoot = "${src.name}/core";
121
-
# x86_64-darwin fails with:
122
-
# "link: duplicated definition of symbol dlopen, from github.com/ebitengine/purego and github.com/ebitengine/purego"
123
-
# This is fixed in purego 0.8.3, but wandb-core uses 0.8.2, so we pull in the fix here.
124
-
patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
126
-
url = "https://github.com/ebitengine/purego/commit/1638563e361522e5f63511d84c4541ae1c5fd704.patch";
128
-
extraPrefix = "vendor/github.com/ebitengine/purego/";
129
-
# These are not vendored by wandb-core
131
-
"vendor/github.com/ebitengine/purego/.github/workflows/test.yml"
132
-
"vendor/github.com/ebitengine/purego/internal/fakecgo/gen.go"
134
-
hash = "sha256-GoT/OL6r3rJY5zoUyl3kGzSRpX3PoI7Yjpe7oRb0cFc=";
# hardcode the `gpu_stats` binary path.
140
-
substituteInPlace pkg/monitor/gpuresourcemanager.go \
122
+
substituteInPlace internal/monitor/gpuresourcemanager.go \
'cmdPath, err := getGPUCollectorCmdPath()' \
'cmdPath, err := "${lib.getExe gpu-stats}", error(nil)'
···
nativeInstallCheckInputs = [
···
(replaceVars ./hardcode-git-path.patch {
185
-
git = lib.getExe git;
167
+
git = lib.getExe gitMinimal;
189
-
# Hard-code the path to the `wandb-core` binary in the code.
191
-
substituteInPlace wandb/util.py \
193
-
'bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"' \
194
-
'bin_path = pathlib.Path("${lib.getExe wandb-core}")'
172
+
# Prevent hatch from building wandb-core
174
+
substituteInPlace hatch_build.py \
175
+
--replace-fail "artifacts.extend(self._build_wandb_core())" ""
177
+
# Hard-code the path to the `wandb-core` binary in the code.
179
+
substituteInPlace wandb/util.py \
181
+
'bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"' \
182
+
'bin_path = pathlib.Path("${lib.getExe wandb-core}")'
# Prevent the install script to try building and embedding the `gpu_stats` and `wandb-core`
···
google-cloud-artifact-registry