yeehaw
Some checks failed
Check for typos in the source tree / check-typos (push) Has been cancelled

This commit is contained in:
raf 2025-02-06 17:43:54 +03:00
commit b049b797a4
No known key found for this signature in database
GPG key ID: EED98D11B85A2819
18 changed files with 48 additions and 39 deletions

View file

@ -1,10 +1,11 @@
{
self,
inputs,
lib,
...
}: let
typesDag = import ./dag.nix {inherit lib;};
typesPlugin = import ./plugins.nix {inherit inputs lib;};
typesPlugin = import ./plugins.nix {inherit self inputs lib;};
typesLanguage = import ./languages.nix {inherit lib;};
customTypes = import ./custom.nix {inherit lib;};
in {

View file

@ -1,12 +1,13 @@
{
self,
inputs,
lib,
...
}: let
inherit (lib.options) mkOption;
inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair;
inherit (lib.strings) hasPrefix removePrefix;
inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr;
inherit (lib.strings) hasPrefix removePrefix replaceStrings toLower;
inherit (lib.types) submodule either package enum str lines anything listOf nullOr;
# Get the names of all flake inputs that start with the given prefix.
fromInputs = {
@ -16,10 +17,7 @@
mapAttrs' (n: v: nameValuePair (removePrefix prefix n) {src = v;}) (filterAttrs (n: _: hasPrefix prefix n) inputs);
# Get the names of all flake inputs that start with the given prefix.
pluginInputNames = attrNames (fromInputs {
inherit inputs;
prefix = "plugin-";
});
pluginInputNames = map (pin: replaceStrings ["." "_"] ["-" "-"] (toLower pin)) (attrNames self.pins);
# You can either use the name of the plugin or a package.
pluginType = nullOr (