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

legacyPackages: Use mkTransposedPerSystemModule

This commit is contained in:
Shea Levy 2022-10-30 07:07:59 -04:00
parent e7da962abb
commit 1e5e56e476
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27

View file

@ -1,43 +1,21 @@
{ config, lib, flake-parts-lib, ... }:
let
inherit (lib)
filterAttrs
mapAttrs
mkOption
optionalAttrs
types
;
inherit (flake-parts-lib)
mkSubmoduleOptions
mkPerSystemOption
mkTransposedPerSystemModule
;
in
{
options = {
flake = mkSubmoduleOptions {
legacyPackages = mkOption {
type = types.lazyAttrsOf (types.lazyAttrsOf types.raw);
default = { };
description = ''
Per system, an attribute set of unmergeable values. This is also used by <literal>nix build .#&lt;attrpath></literal>.
'';
};
};
perSystem = mkPerSystemOption ({ config, ... }: {
options = {
legacyPackages = mkOption {
type = types.lazyAttrsOf types.raw;
default = { };
description = ''
An attribute set of unmergeable values. This is also used by <literal>nix build .#&lt;attrpath></literal>.
'';
};
};
});
};
config = {
transposition.legacyPackages = { };
mkTransposedPerSystemModule {
name = "legacyPackages";
option = mkOption {
type = types.lazyAttrsOf types.raw;
default = { };
description = ''
An attribute set of unmergeable values. This is also used by <literal>nix build .#&lt;attrpath></literal>.
'';
};
file = ./legacyPackages.nix;
}