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
|
||||
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
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; }
|
||||
}
|
||||
|
@ -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" ''
|
||||
|
Loading…
Reference in New Issue
Block a user