default: refactor
This commit is contained in:
parent
f0dc2d521d
commit
561afaf18c
10
default.nix
10
default.nix
@ -7,11 +7,13 @@
|
|||||||
# nix-build -A mypackage
|
# nix-build -A mypackage
|
||||||
|
|
||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
|
let
|
||||||
import ./pkgs/top-level/all-packages.nix { inherit pkgs; }
|
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
|
# The `lib`, `modules`, and `overlay` names are special
|
||||||
lib = import ./lib { inherit pkgs; }; # functions
|
lib = import ./lib { inherit pkgs; }; # functions
|
||||||
modules = import ./modules; # NixOS modules
|
modules = import ./modules; # NixOS modules
|
||||||
overlays = import ./overlays; # nixpkgs overlays
|
overlays = import ./overlays; # nixpkgs overlays
|
||||||
} // import ./callUnitRoot.nix { inherit pkgs; }
|
}
|
||||||
|
@ -21,9 +21,10 @@
|
|||||||
packages =
|
packages =
|
||||||
let
|
let
|
||||||
legacyPackages = import ./pkgs/top-level/all-packages.nix { inherit pkgs; };
|
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 [ ]));
|
onlyAvailable = lib.filterAttrs (_: drv: builtins.elem system (drv.meta.platforms or [ ]));
|
||||||
in
|
in
|
||||||
onlyAvailable (legacyPackages // import ./callUnitRoot.nix { inherit pkgs; });
|
onlyAvailable (legacyPackages // unitPackages);
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
|
nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
|
||||||
|
Loading…
Reference in New Issue
Block a user