From b831c70ffd607a522ebbb6a4acfad105999702be Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 4 Nov 2024 00:45:59 +0100 Subject: [PATCH] release.nix: Consider only regular files as examples Recently added commit a9a387b49 ("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. --- release.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release.nix b/release.nix index 0579059c40..b15eafcae2 100644 --- a/release.nix +++ b/release.nix @@ -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" @@ -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