Merge pull request 'lib: move select.select -> select for backwards compat with old CLIs' (#3410) from push-vxxntzmwuzzx into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3410
Reviewed-by: lassulus <clanlol@lassul.us>
This commit is contained in:
Michael Hoang
2025-04-25 09:24:17 +00:00
3 changed files with 4 additions and 4 deletions

View File

@@ -30,6 +30,6 @@ lib.fix (clanLib: {
# Plain imports.
values = import ./introspection { inherit lib; };
jsonschema = import ./jsonschema { inherit lib; };
select = self.inputs.nix-select.lib;
inherit (self.inputs.nix-select.lib) parseSelector applySelectors select;
facts = import ./facts.nix { inherit lib; };
})

View File

@@ -705,7 +705,7 @@ class Flake:
flake = builtins.getFlake("path:{self.store_path}?narHash={self.hash}");
in
flake.inputs.nixpkgs.legacyPackages.{config["system"]}.writeText "clan-flake-select" (
builtins.toJSON [ {" ".join([f"(flake.clanInternals.clanLib.select.applySelectors (builtins.fromJSON ''{attr}'') flake)" for attr in str_selectors])} ]
builtins.toJSON [ {" ".join([f"(flake.clanInternals.clanLib.applySelectors (builtins.fromJSON ''{attr}'') flake)" for attr in str_selectors])} ]
)
"""
if tmp_store := nix_test_store():

View File

@@ -86,8 +86,8 @@
# only adding clanCoreWithVendoredDeps to the nix store is not enough
templateDerivation = pkgs.closureInfo {
rootPaths =
builtins.attrValues (self.clanLib.select.select "clan.templates.clan.*.path" self)
++ builtins.attrValues (self.clanLib.select.select "clan.templates.machine.*.path" self);
builtins.attrValues (self.clanLib.select "clan.templates.clan.*.path" self)
++ builtins.attrValues (self.clanLib.select "clan.templates.machine.*.path" self);
};
clanCoreWithVendoredDeps =