From c808983caa4c6afbece8b9699a723676dc7e0689 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 6 Feb 2021 15:35:42 +0100 Subject: [PATCH] nixos/hercules-ci-agent: Remove patchNix --- .../hercules-ci-agent/common.nix | 55 +++++-------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix index 4aed493c0fb0..24884655c660 100644 --- a/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix +++ b/nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix @@ -9,7 +9,15 @@ Platform-specific code is in the respective default.nix files. { config, lib, options, pkgs, ... }: let - inherit (lib) mkOption mkIf types filterAttrs literalExample mkRenamedOptionModule; + inherit (lib) + filterAttrs + literalExample + mkIf + mkOption + mkRemovedOptionModule + mkRenamedOptionModule + types + ; cfg = config.services.hercules-ci-agent; @@ -77,10 +85,11 @@ let }; }; + # TODO (2022) remove checkNix = if !cfg.checkNix then "" - else if lib.versionAtLeast config.nix.package.version "2.4.0" + else if lib.versionAtLeast config.nix.package.version "2.3.10" then "" else pkgs.stdenv.mkDerivation { name = "hercules-ci-check-system-nix-src"; @@ -88,23 +97,12 @@ let configurePhase = ":"; buildPhase = '' echo "Checking in-memory pathInfoCache expiry" - if ! grep 'struct PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then + if ! grep 'PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then cat 1>&2 <help@hercules-ci.com. ''; }; - patchNix = mkOption { - type = types.bool; - default = false; - description = '' - Fix Nix 2.3 cache path metadata caching behavior. Has the effect of nix.package = patch pkgs.nix; - - This option will be removed when Hercules CI Agent moves to Nix 2.4 (upcoming Nix release). - ''; - }; checkNix = mkOption { type = types.bool; default = true; @@ -206,7 +182,6 @@ in # even shortly after the previous lookup. This *also* applies to the daemon. narinfo-cache-negative-ttl = 0 ''; - nix.package = mkIf cfg.patchNix patchedNix; services.hercules-ci-agent.tomlFile = format.generate "hercules-ci-agent.toml" cfg.settings; };