This may be a bit of a controversial feature suggestion, but if we use the nix feature to declare __functor in attrs, we can make attribute sets callable. This way we can make the haumea flake itself callable. Since we have a go-to function that most people would want to be using with haumea.lib.load, we could make that the default function of the flake. If we write in the main flake:
outputs = { self, nixpkgs }: rec {
# ...
__functor = _system: args: self.lib.load args;
};
Then, in a using flake we could write:
outputs = { self, haumea, nixpkgs }: {
lib = haumea {
src = ./src;
inputs = { inherit (nixpkgs) lib; };
};
};
This may be a bit of a controversial feature suggestion, but if we use the nix feature to declare
__functorin attrs, we can make attribute sets callable. This way we can make the haumea flake itself callable. Since we have a go-to function that most people would want to be using withhaumea.lib.load, we could make that the default function of the flake. If we write in the main flake:Then, in a using flake we could write: