pkgs: use new args of ./modules

This commit is contained in:
Tobias Happ 2021-12-12 00:19:25 +01:00
parent 403336d4c4
commit 75d0c7c565

View file

@ -3,24 +3,21 @@
{ arch, nixOnDroidChannelURL ? null, nixpkgsChannelURL ? null }: { arch, nixOnDroidChannelURL ? null, nixpkgsChannelURL ? null }:
let let
loadNixpkgs = import lib/load-nixpkgs.nix;
nixDirectory = callPackage ./nix-directory.nix { }; nixDirectory = callPackage ./nix-directory.nix { };
packageInfo = import "${nixDirectory}/nix-support/package-info.nix"; packageInfo = import "${nixDirectory}/nix-support/package-info.nix";
nixpkgs = loadNixpkgs { }; nixpkgs = import lib/load-nixpkgs.nix { };
modules = import ../modules { modules = import ../modules {
pkgs = nixpkgs; pkgs = nixpkgs;
extraModules = [ ../modules/build/initial-build.nix ];
extraSpecialArgs = { inherit customPkgs; };
config = { config = {
# Fix invoking bash after initial build. # Fix invoking bash after initial build.
user.shell = "${packageInfo.bash}/bin/bash"; user.shell = "${packageInfo.bash}/bin/bash";
imports = [ ../modules/build/initial-build.nix ];
_module.args = { inherit customPkgs; };
build = { build = {
inherit arch; inherit arch;
@ -39,7 +36,7 @@ let
} }
); );
customPkgs = rec { customPkgs = {
inherit nixDirectory packageInfo; inherit nixDirectory packageInfo;
bootstrap = callPackage ./bootstrap.nix { }; bootstrap = callPackage ./bootstrap.nix { };
bootstrapZip = callPackage ./bootstrap-zip.nix { }; bootstrapZip = callPackage ./bootstrap-zip.nix { };