mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
bootstrap: refactor special args to reduce inputs
This commit is contained in:
parent
2ef9a7faa2
commit
b10dd78e18
4 changed files with 13 additions and 18 deletions
|
|
@ -1,10 +1,10 @@
|
|||
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
|
||||
{ arch ? "aarch64", nixOnDroidChannelURL ? null, nixpkgsChannelURL ? null }:
|
||||
|
||||
let
|
||||
nixDirectory = callPackage ./nix-directory.nix { };
|
||||
packageInfo = import "${nixDirectory}/nix-support/package-info.nix";
|
||||
initialPackageInfo = import "${nixDirectory}/nix-support/package-info.nix";
|
||||
|
||||
nixpkgs = import lib/load-nixpkgs.nix { };
|
||||
|
||||
|
|
@ -13,13 +13,13 @@ let
|
|||
|
||||
extraModules = [ ../modules/build/initial-build.nix ];
|
||||
extraSpecialArgs = {
|
||||
inherit customPkgs;
|
||||
inherit initialPackageInfo;
|
||||
pkgs = nixpkgs.lib.mkForce nixpkgs; # to override ./modules/nixpkgs/config.nix
|
||||
};
|
||||
|
||||
config = {
|
||||
# Fix invoking bash after initial build.
|
||||
user.shell = "${packageInfo.bash}/bin/bash";
|
||||
user.shell = "${initialPackageInfo.bash}/bin/bash";
|
||||
|
||||
build = {
|
||||
inherit arch;
|
||||
|
|
@ -35,12 +35,11 @@ let
|
|||
callPackage = nixpkgs.lib.callPackageWith (
|
||||
nixpkgs // customPkgs // {
|
||||
inherit (modules) config;
|
||||
inherit callPackage;
|
||||
inherit callPackage nixpkgs nixDirectory initialPackageInfo;
|
||||
}
|
||||
);
|
||||
|
||||
customPkgs = {
|
||||
inherit nixDirectory packageInfo;
|
||||
bootstrap = callPackage ./bootstrap.nix { };
|
||||
bootstrapZip = callPackage ./bootstrap-zip.nix { };
|
||||
prootTermux = callPackage ./cross-compiling/proot-termux.nix { };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue