From c2f9181c848a751d31851601dfdc8ce9f038050a Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Mon, 17 May 2021 10:27:58 -0700 Subject: [PATCH] flattenTree: ignore attributes that throw errors --- flattenTree.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flattenTree.nix b/flattenTree.nix index 3ad30d0..c3a535b 100644 --- a/flattenTree.nix +++ b/flattenTree.nix @@ -3,9 +3,10 @@ let op = sum: path: val: let pathStr = builtins.concatStringsSep "/" path; + tryCheckSet = builtins.tryEval ((builtins.typeOf val) == "set"); in - if (builtins.typeOf val) != "set" then - # ignore that value + if !tryCheckSet.value then + # ignore anything thats not a set or throws an error # builtins.trace "${pathStr} is not of type set" sum else if val ? type && val.type == "derivation" then