diff options
author | Vincent Haupert <mail@vincent-haupert.de> | 2022-11-20 11:46:47 +0100 |
---|---|---|
committer | Vincent Haupert <mail@vincent-haupert.de> | 2022-11-20 12:52:32 +0100 |
commit | 83ac8be43cc87f2dc392335e9ab0829a402fcf94 (patch) | |
tree | 1f548ce41b7ee4ac7d06f6d29b114aa942bb59d7 /pkgs/development | |
parent | 959df5f2b2519c5ae6c743a0b7a2dbf75b250da2 (diff) |
github-runner: support `x86_64-darwin`
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/continuous-integration/github-runner/default.nix | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/development/tools/continuous-integration/github-runner/default.nix b/pkgs/development/tools/continuous-integration/github-runner/default.nix index e460ffd2590ad..2f4cb7c411f31 100644 --- a/pkgs/development/tools/continuous-integration/github-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/github-runner/default.nix @@ -6,7 +6,6 @@ , fetchFromGitHub , fetchurl , git -, glibc , icu , libkrb5 , lib @@ -40,6 +39,7 @@ let runtimeIds = { "x86_64-linux" = "linux-x64"; "aarch64-linux" = "linux-arm64"; + "x86_64-darwin" = "osx-x64"; }; runtimeId = runtimeIds.${stdenv.system}; fakeSha1 = "0000000000000000000000000000000000000000"; @@ -61,16 +61,18 @@ stdenv.mkDerivation rec { dotnetSdk dotnetPackages.Nuget makeWrapper + ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ]; buildInputs = [ curl # libcurl.so.4 libkrb5 # libgssapi_krb5.so.2 - lttng-ust # liblttng-ust.so.0 stdenv.cc.cc.lib # libstdc++.so.6 zlib # libz.so.1 icu + ] ++ lib.optionals stdenv.isLinux [ + lttng-ust # liblttng-ust.so.0 ]; patches = [ @@ -104,6 +106,8 @@ stdenv.mkDerivation rec { --replace '/bin/ln' '${coreutils}/bin/ln' ''; + DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = stdenv.isDarwin; + configurePhase = '' runHook preConfigure @@ -137,6 +141,8 @@ stdenv.mkDerivation rec { doCheck = true; + __darwinAllowLocalNetworking = true; + # Fully qualified name of disabled tests disabledTests = [ "GitHub.Runner.Common.Tests.Listener.SelfUpdaterL0.TestSelfUpdateAsync" ] @@ -195,6 +201,13 @@ stdenv.mkDerivation rec { ++ lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [ # "JavaScript Actions in Alpine containers are only supported on x64 Linux runners. Detected Linux Arm64" "GitHub.Runner.Common.Tests.Worker.StepHostL0.DetermineNodeRuntimeVersionInAlpineContainerAsync" + ] + ++ lib.optionals DOTNET_SYSTEM_GLOBALIZATION_INVARIANT [ + "GitHub.Runner.Common.Tests.ProcessExtensionL0.SuccessReadProcessEnv" + "GitHub.Runner.Common.Tests.Util.StringUtilL0.FormatUsesInvariantCulture" + "GitHub.Runner.Common.Tests.Worker.VariablesL0.Constructor_SetsOrdinalIgnoreCaseComparer" + "GitHub.Runner.Common.Tests.Worker.WorkerL0.DispatchCancellation" + "GitHub.Runner.Common.Tests.Worker.WorkerL0.DispatchRunNewJob" ]; checkInputs = [ git ]; @@ -269,7 +282,7 @@ stdenv.mkDerivation rec { # Stripping breaks the binaries dontStrip = true; - preFixup = '' + preFixup = lib.optionalString stdenv.isLinux '' patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so $out/lib/libcoreclrtraceptprovider.so ''; @@ -277,17 +290,16 @@ stdenv.mkDerivation rec { fix_rpath() { patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/$1 } - wrap() { makeWrapper $out/lib/$1 $out/bin/$1 \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (buildInputs ++ [ openssl ])} \ "''${@:2}" } - + '' + lib.optionalString stdenv.isLinux '' fix_rpath Runner.Listener fix_rpath Runner.PluginHost fix_rpath Runner.Worker - + '' + '' wrap Runner.Listener wrap Runner.PluginHost wrap Runner.Worker @@ -296,7 +308,7 @@ stdenv.mkDerivation rec { wrap config.sh --run 'export RUNNER_ROOT=''${RUNNER_ROOT:-$HOME/.github-runner}' \ --run 'mkdir -p $RUNNER_ROOT' \ - --prefix PATH : ${lib.makeBinPath [ glibc.bin ]} \ + --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]} \ --chdir $out ''; @@ -308,7 +320,7 @@ stdenv.mkDerivation rec { # Inspired by passthru.fetch-deps in pkgs/build-support/build-dotnet-module/default.nix passthru.createDepsFile = writeShellApplication { name = "create-deps-file"; - runtimeInputs = [ dotnetSdk (nuget-to-nix.override { dotnet-sdk = dotnetSdk; }) ]; + runtimeInputs = [ coreutils dotnetSdk (nuget-to-nix.override { dotnet-sdk = dotnetSdk; }) ]; text = '' # Disable telemetry data export DOTNET_CLI_TELEMETRY_OPTOUT=1 |