beszel: fix Darwin build (#522076)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{
|
||||
stdenv,
|
||||
buildGo126Module,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
nix-update-script,
|
||||
buildNpmPackage,
|
||||
nixosTests,
|
||||
@@ -53,7 +55,14 @@ buildGo126Module (finalAttrs: {
|
||||
|
||||
vendorHash = "sha256-TVpZbK9V9/GqpVFcjF7QGD5XJJHzRgjVXZOImHQTR1k=";
|
||||
|
||||
tags = [ "testing" ];
|
||||
patches = [
|
||||
# https://github.com/NixOS/nixpkgs/pull/513197
|
||||
(fetchpatch {
|
||||
name = "fix-updater-after-system-manager-shutdown.patch";
|
||||
url = "https://github.com/henrygd/beszel/commit/c538d1de1cf3f4664a2d98086341884a217846e7.patch";
|
||||
hash = "sha256-voIT9b14pgfhnbJrqgoIbQtwZPU1JF0fblybjG9mzvM=";
|
||||
})
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
mkdir -p internal/site/dist
|
||||
@@ -66,15 +75,33 @@ buildGo126Module (finalAttrs: {
|
||||
"TestCollectorStartHelpers/nvtop_collector"
|
||||
"TestApiRoutesAuthentication/GET_/update_-_shouldn't_exist_without_CHECK_UPDATES_env_var"
|
||||
"TestConfigSyncWithTokens"
|
||||
# This subtest assumes enough host CPUs for an 8s CPU delta over 1s to stay below 100%.
|
||||
"TestServiceUpdateCPUPercent/subsequent_call_calculates_CPU_percentage"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"TestCollectorStartHelpers/nvidia-smi_collector"
|
||||
"TestCollectorStartHelpers/rocm-smi_collector"
|
||||
"TestCollectorStartHelpers/tegrastats_collector"
|
||||
"TestNewGPUManagerPriorityNvtopFallback"
|
||||
"TestNewGPUManagerPriorityMixedCollectors"
|
||||
"TestNewGPUManagerPriorityNvmlFallbackToNvidiaSmi"
|
||||
"TestNewGPUManagerConfiguredCollectorsMustStart"
|
||||
"TestNewGPUManagerConfiguredNvmlBypassesCapabilityGate"
|
||||
"TestNewGPUManagerJetsonIgnoresCollectorConfig"
|
||||
];
|
||||
in
|
||||
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
|
||||
[
|
||||
"-skip=^${builtins.concatStringsSep "$|^" skippedTests}$"
|
||||
"-tags=testing"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/agent $out/bin/beszel-agent
|
||||
mv $out/bin/hub $out/bin/beszel-hub
|
||||
'';
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
|
||||
Reference in New Issue
Block a user