Skip to content

Commit

Permalink
release.nix: Consider only regular files as examples
Browse files Browse the repository at this point in the history
Recently added commit a9a387b ("Add flake template", 2024-09-12),
when combined with the previous release.nix changes, resulted in
adding the example/flake subdirectory as an output attribute, which
makes no sense.
  • Loading branch information
wentasah authored and lopsided98 committed Nov 21, 2024
1 parent 056462f commit b831c70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in
}:
let
pkgs = import nix-ros-overlay { inherit nixpkgs system; };
inherit (pkgs.lib) isDerivation;
inherit (pkgs.lib) isDerivation filterAttrs;
inherit (builtins) mapAttrs attrNames filter listToAttrs readDir;
cleanupDistro = (_: a: removeAttrs a [
"lib"
Expand Down Expand Up @@ -41,7 +41,8 @@ let
];
examples = mapAttrs
(file: _: import (./examples + "/${file}") { inherit pkgs; })
(readDir ./examples);
(filterAttrs (n: v: v == "regular")
(readDir ./examples));
};
in
if distro == ".top" then toplevelPackages
Expand Down

0 comments on commit b831c70

Please sign in to comment.