Skip to content

Commit

Permalink
overview stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzleutgeb committed Apr 15, 2024
1 parent 34b62e3 commit bea3a7e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions overview.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
self,
lib,
ngipkgs,
packages,
options,
...
}: let
Expand All @@ -23,13 +24,19 @@
then "[`${self.shortRev}`](https://github.com/ngi-nix/ngipkgs/tree/${self.rev})"
else self.dirtyRev;

projects = builtins.attrNames packages;

/*
projects = lib.lists.unique (
map (x: x.meta.ngi.project) (builtins.filter (x: x ? meta.ngi) ngipkgsValues)
);
*/

packagesByProject = project: builtins.filter (x: x.meta.ngi.project or null == project) ngipkgsValues;
#packagesByProject = project: builtins.filter (x: x.meta.ngi.project or null == project) ngipkgsValues;
packagesByProject = project: builtins.attrValues (builtins.getAttr project packages);

packagesWithoutProject = packagesByProject null;
#packagesWithoutProject = packagesByProject null;
packagesWithoutProject = [];

# Options

Expand All @@ -38,10 +45,14 @@
builtins.concatMap (x: x.meta.ngi.options) (builtins.filter (x: x ? meta.ngi.options) ngipkgsValues)
);

/*
optionsByProject = project:
builtins.filter
(option: anyOption (optionSpecByProject project) option.loc)
(builtins.attrValues options);
*/

optionsByProject = project: (builtins.getAttr project options).optionsNix;

renderOptions = projectOptions:
lib.strings.optionalString (!empty projectOptions)
Expand Down

0 comments on commit bea3a7e

Please sign in to comment.