From f10a3aa17c9cbb1d217ab03369909af6fc29e1d0 Mon Sep 17 00:00:00 2001 From: Sergey Gulin Date: Mon, 1 Apr 2024 14:52:41 +0300 Subject: [PATCH] [Chore] Fix overlay Problem: In my recent PR(#264), I accidentally picked overlay output changes from the philtaken/nixos-vm-tests branch, which broke existing overlay imports after updating the deploy-rs input. Solution: Add backwards compatibility so that users don't have to make changes to their nix flakes. --- README.md | 2 +- flake.nix | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 49b993a..672db8f 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ In the above configuration, `deploy-rs` is built from the flake, not from nixpkg deployPkgs = import nixpkgs { inherit system; overlays = [ - deploy-rs.overlay + deploy-rs.overlay # or deploy-rs.overlays.default (self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; }) ]; }; diff --git a/flake.nix b/flake.nix index fa975a9..9f34a9e 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,8 @@ }; outputs = { self, nixpkgs, utils, ... }@inputs: - { - overlays.default = final: prev: let + rec { + overlay = final: prev: let system = final.stdenv.hostPlatform.system; darwinOptions = final.lib.optionalAttrs final.stdenv.isDarwin { buildInputs = with final.darwin.apple_sdk.frameworks; [ @@ -147,6 +147,7 @@ }; }; }; + overlays.default = overlay; } // utils.lib.eachSystem (utils.lib.defaultSystems ++ ["aarch64-darwin"]) (system: let