Skip to content

Commit

Permalink
Make sure to not break hydra
Browse files Browse the repository at this point in the history
  • Loading branch information
kip93 committed Sep 23, 2023
1 parent bc36e1d commit 419b96c
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 10 deletions.
83 changes: 77 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
url = "github:NixOS/hydra/master";
inputs = {
nixpkgs.follows = "nixpkgs";
nix.follows = "nix";
# nix.follows = "nix"; # DON'T! See hydra#1182
};
};
impermanence = {
Expand Down
23 changes: 20 additions & 3 deletions overlays/overrides/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

{ hydra, nix, ... } @ inputs:
final: prev: {
hydra_unstable = final.hydra;
} // (hydra.overlays.default final prev) // (nix.overlays.default final prev)
final: prev:
let
# Avoid infinite recursion by renaming flakes
hydra' = hydra;
nix' = nix;
in
let
# A fake overlaid pkgs, to ensure that hydra uses it's own version of nix,
# due to hydra#1182
hydra_final = final // (hydra'.inputs.nix.overlays.default hydra_final prev);
# Get the relevant bits out of the provided overlays
inherit (hydra'.overlays.default hydra_final prev) hydra perlPackages;
inherit (nix'.overlays.default final prev) lowdown-nix nix;

in
{
# Expose the extracted packages into the overlay
inherit lowdown-nix nix;
hydra_unstable = hydra;
}

0 comments on commit 419b96c

Please sign in to comment.