mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
bootstrap: inject nixOnDroidFlakeURL
This commit is contained in:
parent
c4365ef010
commit
5900404627
3 changed files with 25 additions and 11 deletions
|
|
@ -10,17 +10,27 @@ with lib;
|
|||
|
||||
options = {
|
||||
|
||||
build.channel = {
|
||||
nixpkgs = mkOption {
|
||||
type = types.str;
|
||||
default = "https://nixos.org/channels/nixos-22.05";
|
||||
description = "Channel URL for nixpkgs.";
|
||||
build = {
|
||||
channel = {
|
||||
nixpkgs = mkOption {
|
||||
type = types.str;
|
||||
default = "https://nixos.org/channels/nixos-22.05";
|
||||
description = "Channel URL for nixpkgs.";
|
||||
};
|
||||
|
||||
nix-on-droid = mkOption {
|
||||
type = types.str;
|
||||
default = "https://github.com/t184256/nix-on-droid/archive/release-22.05.tar.gz";
|
||||
description = "Channel URL for nix-on-droid.";
|
||||
};
|
||||
};
|
||||
|
||||
nix-on-droid = mkOption {
|
||||
type = types.str;
|
||||
default = "https://github.com/t184256/nix-on-droid/archive/release-22.05.tar.gz";
|
||||
description = "Channel URL for nix-on-droid.";
|
||||
flake = {
|
||||
nix-on-droid = mkOption {
|
||||
type = types.str;
|
||||
default = "github:t184256/nix-on-droid/release-22.05";
|
||||
description = "Flake URL for nix-on-droid.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
, arch ? "aarch64"
|
||||
, nixOnDroidChannelURL ? null
|
||||
, nixpkgsChannelURL ? null
|
||||
, nixOnDroidFlakeURL ? null
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
@ -28,13 +29,15 @@ let
|
|||
# Fix invoking bash after initial build.
|
||||
user.shell = "${initialPackageInfo.bash}/bin/bash";
|
||||
|
||||
build = {
|
||||
build = with pkgs.lib; {
|
||||
inherit arch;
|
||||
|
||||
channel = with pkgs.lib; {
|
||||
channel = {
|
||||
nixpkgs = mkIf (nixpkgsChannelURL != null) nixpkgsChannelURL;
|
||||
nix-on-droid = mkIf (nixOnDroidChannelURL != null) nixOnDroidChannelURL;
|
||||
};
|
||||
|
||||
flake.nix-on-droid = mkIf (nixOnDroidFlakeURL != null) nixOnDroidFlakeURL;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ let
|
|||
bootstrap = import ../pkgs {
|
||||
inherit nixpkgs system;
|
||||
nixOnDroidChannelURL = "file:///n-o-d/archive.tar.gz";
|
||||
nixOnDroidFlakeURL = "/n-o-d/unpacked";
|
||||
};
|
||||
in
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue