From 90d04d943b2ac6e3a7c0d1ff3fd5ca2769746c72 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 10 Jan 2022 03:36:31 +0100 Subject: [PATCH] hydra: hack, update to nix master --- hosts/containers/hydra/default.nix | 16 ++++++++++++++++ hosts/containers/hydra/hydra.nix | 10 +++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/hosts/containers/hydra/default.nix b/hosts/containers/hydra/default.nix index e12627b4..3e210e7b 100644 --- a/hosts/containers/hydra/default.nix +++ b/hosts/containers/hydra/default.nix @@ -60,6 +60,22 @@ }]; }; + nixpkgs.config.packageOverrides = pkgs: { + # HACK: nix-2.5.1 is broken + nixUnstable = pkgs.nixUnstable.overrideAttrs (oa: rec { + version = "2.6${VERSION_SUFFIX}"; + VERSION_SUFFIX = "pre20220107_${pkgs.lib.substring 0 7 src.rev}"; + patches = []; + src = pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nix"; + rev = "fcddaa4b9b22a910a24a513bc05579a12eb1db41"; + sha256 = "1v5z2kc9gard6sqxqi73w37x1jfa9ja04svkwr9f1dfj3vl3xygp"; + }; + }); + }; + + # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you diff --git a/hosts/containers/hydra/hydra.nix b/hosts/containers/hydra/hydra.nix index db9e6a5b..18b642c4 100644 --- a/hosts/containers/hydra/hydra.nix +++ b/hosts/containers/hydra/hydra.nix @@ -40,7 +40,15 @@ in { hydraURL = "https://hydra.hq.c3d2.de"; logo = ./c3d2.svg; notificationSender = "hydra@spam.works"; - package = pkgs.hydra-unstable; + package = pkgs.hydra-unstable.overrideAttrs (oa: { + # HACK for Hydra error: cannot write modified lock file of flake + patchPhase = '' + ${pkgs.lib.optionalString (oa ? patchPhase) oa.patchPhase} + + substituteInPlace src/script/hydra-eval-jobset \ + --replace '"nix", "flake", "info"' '"nix", "flake", "info", "--no-write-lock-file"' + ''; + }); useSubstitutes = true; };