1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00

Move perSystem.legacyPackages into options

This commit is contained in:
Robert Hensing 2022-05-17 10:10:07 +02:00
parent a329428f20
commit fdd87732fd

View file

@ -9,6 +9,7 @@ let
; ;
inherit (flake-modules-core-lib) inherit (flake-modules-core-lib)
mkSubmoduleOptions mkSubmoduleOptions
mkPerSystemOption
; ;
in in
{ {
@ -22,7 +23,20 @@ in
''; '';
}; };
}; };
perSystem = mkPerSystemOption ({ config, ... }: {
options = {
legacyPackages = mkOption {
type = types.lazyAttrsOf types.anything;
default = { };
description = ''
An attribute set of anything. This is also used by <literal>nix build .#&lt;attrpath></literal>.
'';
}; };
};
});
};
config = { config = {
flake.legacyPackages = flake.legacyPackages =
mapAttrs mapAttrs
@ -37,17 +51,5 @@ in
legacyPackages = flake.legacyPackages.${system}; legacyPackages = flake.legacyPackages.${system};
}; };
perSystem = system: { config, ... }: {
_file = ./legacyPackages.nix;
options = {
legacyPackages = mkOption {
type = types.lazyAttrsOf types.anything;
default = { };
description = ''
An attribute set of anything. This is also used by <literal>nix build .#&lt;attrpath></literal>.
'';
};
};
};
}; };
} }