Skip to content

Commit

Permalink
Use recursive flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
josh authored Sep 24, 2024
1 parent 0cd76f9 commit c431ee3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
formatting = treefmtEval.${pkgs.system}.config.build.check self;

plugins = pkgs.runCommandLocal "plugins" {
buildInputs = lib.attrDerivations plugins;
buildInputs = lib.flattenDerivations plugins;
} ''echo "ok" >$out'';

help = pkgs.runCommandLocal "nvim-help" { } ''
Expand All @@ -172,6 +172,9 @@
'';

LazyVim-extras-catppuccin = plugins.LazyVim.extras."lazyvim.plugins".catppuccin;
# LazyVim-extras-all = pkgs.runCommandLocal "LazyVim-extras-all" {
# buildInputs = lib.flattenDerivations plugins.LazyVim.extras;
# } ''echo "ok" >$out'';
}
);
};
Expand Down
4 changes: 0 additions & 4 deletions lib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
let
inherit (nixpkgs) lib;

# attrDerivations :: AttrSet -> [ Derivation ]
attrDerivations = attrset: builtins.filter lib.attrsets.isDerivation (builtins.attrValues attrset);

# flattenDerivations :: AttrSet -> [ Derivation ]
flattenDerivations =
attrset:
Expand Down Expand Up @@ -122,7 +119,6 @@ let
in
{
inherit
attrDerivations
flattenDerivations
defaultLazyOpts
makeLazyNeovimConfig
Expand Down

0 comments on commit c431ee3

Please sign in to comment.