From 92ade60501de6384c2ec02fcb985eea75e49eb9a Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 22 Jul 2020 10:42:18 +0200 Subject: [PATCH] actually export flattenTree --- default.nix | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/default.nix b/default.nix index 26eced0..978a2ad 100644 --- a/default.nix +++ b/default.nix @@ -37,17 +37,6 @@ let builtins.foldl' op { } systems ; - # Returns the structure used by `nix app` - mkApp = - { drv - , name ? drv.pname or drv.name - , exePath ? drv.passthru.exePath or "/bin/${name}" - }: - { - type = "app"; - program = "${drv}${exePath}"; - }; - # Nix flakes insists on having a flat attribute set of derivations in # various places like the `packages` and `checks` attributes. # @@ -68,12 +57,24 @@ let # # ... # } flattenTree = tree: import ./flattenTree.nix tree; + + # Returns the structure used by `nix app` + mkApp = + { drv + , name ? drv.pname or drv.name + , exePath ? drv.passthru.exePath or "/bin/${name}" + }: + { + type = "app"; + program = "${drv}${exePath}"; + }; in { inherit defaultSystems eachDefaultSystem eachSystem + flattenTree mkApp ;