feat(lib): add __functor and systemDependent lib

This commit is contained in:
Gerg-L 2025-11-09 13:31:36 -05:00
parent 22734d06da
commit 8d82feb56f
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI

View file

@ -1,6 +1,25 @@
{ self, ... }@inputs:
myLib: lib:
let
systemDependent = {
appendSystem = system: x: "${x}-${system}";
};
in
{
inherit systemDependent;
__functor =
self: system:
let
systemDependent = builtins.mapAttrs (_: v: v system) self.sysDependantFuncs;
in
self
// {
inherit systemDependent;
}
// systemDependent;
myLib: lib: {
overlay = import ./overlay.nix inputs;
wrench = lib.flip lib.pipe;
@ -135,3 +154,4 @@ myLib: lib: {
};
}
// systemDependent