From 43be9effabc1c6b12af0c2aef25b282420ab3c26 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 5 Oct 2024 19:46:56 -0600 Subject: [PATCH] flake.nix: Patch nix-eval-jobs for NIX_PATH --- flake.nix | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 0556aff..78a8301 100644 --- a/flake.nix +++ b/flake.nix @@ -83,11 +83,21 @@ in if pkgs.stdenv.isLinux then import ./integration-tests { pkgs = import nixpkgs { inherit system; - overlays = [ self.overlays.default inputsOverlay ]; + overlays = [ + self.overlays.default + inputsOverlay + + self._evalJobsOverlay + ]; }; pkgsStable = import stable { inherit system; - overlays = [ self.overlays.default inputsOverlay ]; + overlays = [ + self.overlays.default + inputsOverlay + + self._evalJobsOverlay + ]; }; } else {}; }) // { @@ -104,6 +114,23 @@ inherit rawHive colmenaOptions colmenaModules; hermetic = true; }; + + # Temporary fork of nix-eval-jobs with changes to be upstreamed + # Mostly for the integration test setup and not needed in most use cases + _evalJobsOverlay = final: prev: let + patched = prev.nix-eval-jobs.overrideAttrs (old: { + version = old.version + "-colmena"; + patches = (old.patches or []) ++ [ + # Allows NIX_PATH to be honored + (final.fetchpatch { + url = "https://github.com/zhaofengli/nix-eval-jobs/commit/6ff5972724230ac2b96eb1ec355cd25ca512ef57.patch"; + hash = "sha256-2NiMYpw27N+X7Ixh2HkP3fcWvopDJWQDVjgRdhOL2QQ"; + }) + ]; + }); + in { + nix-eval-jobs = patched; + }; }; nixConfig = {