fix(): merge 'follows' directives with mkDep

This commit is contained in:
matt1432 2024-08-02 23:28:04 -04:00
parent 24aa4b9842
commit 2861935ddd
4 changed files with 43 additions and 68 deletions

View file

@ -3,9 +3,29 @@ let
# Misc functions
mkInput = {type ? "github", ...} @ info: info // {inherit type;};
mkDep = info: (mkInput info) // {inputs.nixpkgs.follows = "nixpkgs";};
mkHyprDep = info: (mkInput info) // {inputs.hyprland.follows = "hyprland";};
mkSrc = info: (mkInput info) // {flake = false;};
mkDep = info:
mkInput (info
// {
inputs =
{nixpkgs.follows = "nixpkgs";}
// (
if builtins.hasAttr "inputs" info
then info.inputs
else {}
);
});
mkHyprDep = info:
mkInput (info
// {
inputs =
{hyprland.follows = "hyprland";}
// (
if builtins.hasAttr "inputs" info
then info.inputs
else {}
);
});
mkSrc = info: mkInput (info // {flake = false;});
# Inputs
nixTools = {