diff --git a/src/default.nix b/src/default.nix index 916209d..bab8ba9 100644 --- a/src/default.nix +++ b/src/default.nix @@ -14,15 +14,7 @@ let in flops.lib.haumea.pops.default.setInit { src = ./.; - transformer = [ - ( - cursor: dir: - if (builtins.length cursor == 0 && (dir ? default)) then - removeAttrs dir [ "default" ] - else - dir - ) - ]; + transformer = [ (import ./lib/haumea/removeTopDefault.nix { }) ]; inputs = { lib = (nixlib.lib.recursiveUpdate nixlib.lib inputs.self.lib) // builtins; haumea = haumea.lib; diff --git a/src/lib/haumea/removeTopDefault.nix b/src/lib/haumea/removeTopDefault.nix index db622d9..0221a1a 100644 --- a/src/lib/haumea/removeTopDefault.nix +++ b/src/lib/haumea/removeTopDefault.nix @@ -1,6 +1,5 @@ -{ lib }: -cursor: dir: -if (lib.length cursor == 0 && (dir ? default)) then +_: cursor: dir: +if (builtins.length cursor == 0 && (dir ? default)) then removeAttrs dir [ "default" ] else dir diff --git a/units/std/defaultCellsFrom/dev/packages.nix b/units/std/defaultCellsFrom/dev/packages.nix index a64d34b..55a9165 100644 --- a/units/std/defaultCellsFrom/dev/packages.nix +++ b/units/std/defaultCellsFrom/dev/packages.nix @@ -1 +1 @@ -cell.pops.packages.exports.derivations +cell.pops.packages.exports.derivations or { } diff --git a/units/std/defaultCellsFrom/prod/packages.nix b/units/std/defaultCellsFrom/prod/packages.nix index a64d34b..55a9165 100644 --- a/units/std/defaultCellsFrom/prod/packages.nix +++ b/units/std/defaultCellsFrom/prod/packages.nix @@ -1 +1 @@ -cell.pops.packages.exports.derivations +cell.pops.packages.exports.derivations or { } diff --git a/units/std/mkContent.nix b/units/std/mkContent.nix index ed0a979..c21671e 100644 --- a/units/std/mkContent.nix +++ b/units/std/mkContent.nix @@ -20,23 +20,28 @@ recursiveMerge [ "aarch64-linux" "x86_64-linux" ]; - cellBlocks = with std.blockTypes; [ - (data "configs") - (data "data") - (installables "packages" { ci.build = true; }) - # runnables - (runnables "scripts") - (runnables "tasks") + cellBlocks = + with std.blockTypes; + let + functions' = name: (functions name) // { cli = false; }; + in + [ + (data "configs") + (data "data") + (installables "packages" { ci.build = true; }) + # runnables + (runnables "scripts") + (runnables "tasks") - (functions "devshellProfiles") - (devshells "shells") - (super.blockTypes.jupyenv "jupyenv") + (functions' "devshellProfiles") + (devshells "shells") + (super.blockTypes.jupyenv "jupyenv") - (nixago "nixago") - (containers "containers" { ci.publish = true; }) - (functions "lib") - (functions "pops") - ]; + (nixago "nixago") + (containers "containers" { ci.publish = true; }) + (functions' "lib") + (functions' "pops") + ]; } (lib.removeAttrs top [ "projectRoot" ]) ]