Skip to content

Commit

Permalink
flake: remove compatibility with nix < 2.7 layout
Browse files Browse the repository at this point in the history
  • Loading branch information
oxalica committed May 31, 2024
1 parent 7ab714f commit 3140403
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

outputs = { self, nixpkgs, flake-utils }: let
inherit (nixpkgs.lib)
elem filterAttrs head mapAttrs mapAttrs' optionalAttrs replaceStrings warnIf;

inherit (builtins)
nixVersion compareVersions;
elem filterAttrs head mapAttrs' optionalAttrs replaceStrings;

overlay = import ./.;

Expand All @@ -38,18 +35,6 @@
default = overlay;
rust-overlay = overlay;
};

# Compatible fields.
# Put them outside `eachSystem` to suppress duplicated warnings.
overlay =
warnIf (compareVersions nixVersion "2.7" >= 0)
"rust-overlay's flake output `overlay` is deprecated in favor of `overlays.default` for Nix >= 2.7"
overlay;
defaultPackage =
warnIf (compareVersions nixVersion "2.7" >= 0)
"rust-overlay's flake output `defaultPackage.<system>` is deprecated in favor of `packages.<system>.default` for Nix >= 2.7"
(mapAttrs (_: pkgs: pkgs.default) self.packages);

} // flake-utils.lib.eachSystem allSystems (system: let
pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; };
in {
Expand Down

0 comments on commit 3140403

Please sign in to comment.