Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC 140 2b] pkgs/by-name: Automated migration #211832

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
21,681 changes: 245 additions & 21,436 deletions pkgs/top-level/all-packages.nix

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion pkgs/top-level/stage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@
arguments. Normal users should not import this directly but instead
import `pkgs/default.nix` or `default.nix`. */


let
# Cache mapping from attributes to unit directories up here so it can get
# reused every time this file is called
unitDirs = builtins.foldl' (result: shard:
result // builtins.mapAttrs (name: type:
../unit + "/${shard}/${name}/pkg-fun.nix"
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
piegamesde marked this conversation as resolved.
Show resolved Hide resolved
) (builtins.readDir (../unit + "/${shard}"))
) {} (builtins.attrNames (builtins.readDir ../unit));
in
{ ## Misc parameters kept the same for all stages
##

Expand Down Expand Up @@ -269,6 +277,9 @@ let
});
};


unitPackages = self: super: lib.mapAttrs (name: file: self.callPackage file {}) unitDirs;

# The complete chain of package set builders, applied from top to bottom.
# stdenvOverlays must be last as it brings package forward from the
# previous bootstrapping phases which have already been overlayed.
Expand All @@ -277,6 +288,7 @@ let
stdenvAdapters
trivialBuilders
splice
unitPackages
allPackages
otherPackageSets
aliases
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading