mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
46 lines
1.3 KiB
Nix
46 lines
1.3 KiB
Nix
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
|
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
|
|
|
{ arch, nixOnDroidChannelURL ? null, nixpkgsChannelURL ? null }:
|
|
|
|
let
|
|
loadNixpkgs = import lib/load-nixpkgs.nix;
|
|
|
|
nixpkgs = loadNixpkgs { };
|
|
|
|
config = import ../modules {
|
|
pkgs = nixpkgs;
|
|
initialBuild = true;
|
|
|
|
config = {
|
|
imports = [ ../modules/build/initial-build ];
|
|
|
|
_module.args = { inherit customPkgs; };
|
|
|
|
build = {
|
|
inherit arch;
|
|
|
|
channel = with nixpkgs.lib; {
|
|
nixpkgs = mkIf (nixpkgsChannelURL != null) nixpkgsChannelURL;
|
|
nix-on-droid = mkIf (nixOnDroidChannelURL != null) nixOnDroidChannelURL;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
callPackage = nixpkgs.lib.callPackageWith (
|
|
nixpkgs // customPkgs // { inherit callPackage config; }
|
|
);
|
|
|
|
customPkgs = rec {
|
|
bootstrap = callPackage ./bootstrap.nix { };
|
|
bootstrapZip = callPackage ./bootstrap-zip.nix { };
|
|
nixDirectory = callPackage ./nix-directory.nix { };
|
|
packageInfo = import "${nixDirectory}/nix-support/package-info.nix";
|
|
prootTermux = callPackage ./cross-compiling/proot-termux.nix { };
|
|
qemuAarch64Static = callPackage ./qemu-aarch64-static.nix { };
|
|
talloc = callPackage ./cross-compiling/talloc.nix { };
|
|
};
|
|
in
|
|
|
|
customPkgs
|