diff --git a/default.nix b/default.nix index 42a0f68..df1b27a 100644 --- a/default.nix +++ b/default.nix @@ -7,11 +7,13 @@ # nix-build -A mypackage { pkgs ? import { } }: - -import ./pkgs/top-level/all-packages.nix { inherit pkgs; } -// { +let + legacy = import ./pkgs/top-level/all-packages.nix { inherit pkgs; }; + units = import ./callUnitRoot.nix { inherit pkgs; root = ./pkgs/unit; }; +in +legacy // units // { # The `lib`, `modules`, and `overlay` names are special lib = import ./lib { inherit pkgs; }; # functions modules = import ./modules; # NixOS modules overlays = import ./overlays; # nixpkgs overlays -} // import ./callUnitRoot.nix { inherit pkgs; } +} diff --git a/flake.nix b/flake.nix index 001e3ef..c9bdadb 100644 --- a/flake.nix +++ b/flake.nix @@ -21,9 +21,10 @@ packages = let legacyPackages = import ./pkgs/top-level/all-packages.nix { inherit pkgs; }; + unitPackages = import ./callUnitRoot.nix { inherit pkgs; }; onlyAvailable = lib.filterAttrs (_: drv: builtins.elem system (drv.meta.platforms or [ ])); in - onlyAvailable (legacyPackages // import ./callUnitRoot.nix { inherit pkgs; }); + onlyAvailable (legacyPackages // unitPackages); checks = { nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''