anchor.diff:        path = "${x}";
       })
       deps;
  -  nugetSource = linkFarm "${pname}-${version}-packages" nugetPackages;
  +  nugetSource = linkFarm "nuget-packages" nugetPackages;
   
     dotnetSdk = dotnetCorePackages.sdk_3_1;
     runtimeId = "linux-x64";
  -
  -  disabledTest = [
  +in
  +stdenv.mkDerivation rec {
  +  pname = "github-runner";
  +  version = "2.279.0";
  +
  +  src = fetchFromGitHub {
  +    owner = "actions";
  +    repo = "runner";
  +    rev = "6b75179ec79e2041b3b5b4e9206b73db2d206aac"; # v${version}
  +    sha256 = "sha256-d7LAHL8Ff7R++d1HuLxWjtiBZRogySe7xHY/xJAcFms=";
  +  };
  +
  +  nativeBuildInputs = [
  +    dotnetSdk
  +    dotnetPackages.Nuget
  +    makeWrapper
  +    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
  +  ];
  +
  +  patches = [
  +    # Don't run Git, no restore on build/test
  +    ./patches/dir-proj.patch
  +    # Replace some paths that originally point to Nix's read-only store
  +    ./patches/host-context-dirs.patch
  +    # Use GetDirectory() to obtain "diag" dir
  +    ./patches/use-get-directory-for-diag.patch
  +    # Don't try to install systemd service
  +    ./patches/dont-install-systemd-service.patch
  +    # Don't try to self-update runner (cannot be disabled, see https://github.com/actions/runner/issues/485)
  +    ./patches/ignore-self-update.patch
  +  ];
  +
  +  postPatch = ''
  +    # Relax the version requirement
  +    substituteInPlace src/global.json \
  +      --replace '3.1.302' '${dotnetSdk.version}'
  +
  +    # Disable specific tests
  +    substituteInPlace src/dir.proj \
  +      --replace 'dotnet test Test/Test.csproj' \
  +                "dotnet test Test/Test.csproj --filter '${lib.concatStringsSep "&amp;" disabledTests}'"
  +
  +    # We don't use a Git checkout
  +    substituteInPlace src/dir.proj \
  +      --replace 'git update-index --assume-unchanged ./Runner.Sdk/BuildConstants.cs' \
  +                'echo Patched out.'
  +
  +    # Fix FHS path
  +    substituteInPlace src/Test/L0/Util/IOUtilL0.cs \
  +      --replace '/bin/ln' '${coreutils}/bin/ln'
  +  '';
  +
  +  configurePhase = ''
  +    runHook preConfigure
  +
  +    # Set up Nuget dependencies
  +    export HOME=$(mktemp -d)
  +    export DOTNET_CLI_TELEMETRY_OPTOUT=1
  +    export DOTNET_NOLOGO=1
  +
  +    # Never use nuget.org
  +    nuget sources Disable -Name "nuget.org"
  +
  +    # Restore the dependencies
  +    dotnet restore src/ActionsRunner.sln \
  +      --runtime "${runtimeId}" \
  +      --source "${nugetSource}"
  +
  +    runHook postConfigure
  +  '';
  +
  +  postConfigure = ''
  +    # `crossgen` dependency is called during build
  +    patchelf \
  +      --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
  +      --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
  +      $HOME/.nuget/packages/microsoft.netcore.app.runtime.${runtimeId}/*/tools/crossgen
  +  '';
  +
  +  buildPhase = ''
  +    runHook preBuild
  +
  +    dotnet msbuild \
  +      -t:Build \
  +      -p:PackageRuntime="${runtimeId}" \
  +      -p:BUILDCONFIG="Release" \
  +      -p:RunnerVersion="${version}" \
  +      -p:GitInfoCommitHash="${src.rev}" \
  +      src/dir.proj
  +
  +    runHook postBuild
  +  '';
  +
  +  doCheck = true;
  +
  +  disabledTests = [
       # Self-updating is patched out, hence this test will fail
       "FullyQualifiedName!=GitHub.Runner.Common.Tests.Listener.RunnerL0.TestRunOnceHandleUpdateMessage"
     ] ++ map
  
positive.code:       "EnsureDotnetsdkBashDownloadScriptUpToDate"
        "EnsureDotnetsdkPowershellDownloadScriptUpToDate"
      ];
    testFilterXml = lib.concatStringsSep "&amp;" disabledTest;
  in
  stdenv.mkDerivation rec {
    inherit pname version;
  
    src = fetchFromGitHub {
      owner = "actions";
      repo = "runner";
      rev = "6b75179ec79e2041b3b5b4e9206b73db2d206aac"; # v${version}
      sha256 = "sha256-d7LAHL8Ff7R++d1HuLxWjtiBZRogySe7xHY/xJAcFms=";
    };
  
    nativeBuildInputs = [
      dotnetSdk
      dotnetPackages.Nuget
      makeWrapper
      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
    ];
  
    patches = [
      # Don't run Git, no restore on build/test
      ./patches/dir-proj.patch
      # Replace some paths that originally point to Nix's read-only store
      ./patches/host-context-dirs.patch
      # Use GetDirectory() to obtain "diag" dir
      ./patches/use-get-directory-for-diag.patch
      # Don't try to install systemd service
      ./patches/dont-install-systemd-service.patch
      # Don't try to self-update runner (cannot be disabled, see https://github.com/actions/runner/issues/485)
      ./patches/ignore-self-update.patch
    ];
  
    postPatch = ''
      # Relax the version requirement
      substituteInPlace src/global.json \
        --replace '3.1.302' '${dotnetSdk.version}'
  
      # Disable specific tests
      substituteInPlace src/dir.proj \
        --replace 'dotnet test Test/Test.csproj' \
                  "dotnet test Test/Test.csproj --filter '${testFilterXml}'"
  
      # We don't use a Git checkout
      substituteInPlace src/dir.proj \
        --replace 'git update-index --assume-unchanged ./Runner.Sdk/BuildConstants.cs' \
                  'echo Patched out.'
  
      # Fix FHS path
      substituteInPlace src/Test/L0/Util/IOUtilL0.cs \
        --replace '/bin/ln' '${coreutils}/bin/ln'
    '';
  
    configurePhase = ''
      runHook preConfigure
  
      # Set up Nuget dependencies
      export HOME=$(mktemp -d)
      export DOTNET_CLI_TELEMETRY_OPTOUT=1
      export DOTNET_NOLOGO=1
  
      # Never use nuget.org
      nuget sources Disable -Name "nuget.org"
  
      # Restore the dependencies
      dotnet restore src/ActionsRunner.sln \
        --runtime "${runtimeId}" \
        --source "${nugetSource}"
  
      runHook postConfigure
    '';
  
    postConfigure = ''
      # `crossgen` dependency is called during build
      patchelf \
        --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
        --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
        $HOME/.nuget/packages/microsoft.netcore.app.runtime.${runtimeId}/*/tools/crossgen
    '';
  
    buildPhase = ''
      runHook preBuild
  
      dotnet msbuild \
        -t:Build \
        -p:PackageRuntime="${runtimeId}" \
        -p:BUILDCONFIG="Release" \
        -p:RunnerVersion="${version}" \
        -p:GitInfoCommitHash="${src.rev}" \
        src/dir.proj
  
      runHook postBuild
    '';
  
    doCheck = true;
  
    checkInputs = [ git ];
  
  
negative.code: , zlib
  }:
  let
    deps = (import ./deps.nix { inherit fetchurl; });
    nugetPackages = map
      (x: {
  