mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
Add nixOnDroidChannelURL and nixpkgsChannelURL
Add nixOnDroidChannelURL and nixpkgsChannelURL as build parameters.
This commit is contained in:
parent
7775c8f1d6
commit
a3d4712695
4 changed files with 22 additions and 8 deletions
|
|
@ -1,7 +1,11 @@
|
||||||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||||
|
|
||||||
{ arch, initialBuild ? true }:
|
{ arch
|
||||||
|
, nixOnDroidChannelURL ? https://github.com/t184256/nix-on-droid-bootstrap/archive/testing.tar.gz
|
||||||
|
, nixpkgsChannelURL ? https://nixos.org/channels/nixos-19.03
|
||||||
|
, initialBuild ? true
|
||||||
|
}:
|
||||||
|
|
||||||
assert builtins.elem arch [ "aarch64" "i686" ];
|
assert builtins.elem arch [ "aarch64" "i686" ];
|
||||||
|
|
||||||
|
|
@ -15,7 +19,7 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
import ./pkgs {
|
import ./pkgs {
|
||||||
inherit arch initialBuild;
|
inherit arch initialBuild nixOnDroidChannelURL nixpkgsChannelURL;
|
||||||
inherit (pkgsList) pinnedPkgs crossPkgs crossStaticPkgs;
|
inherit (pkgsList) pinnedPkgs crossPkgs crossStaticPkgs;
|
||||||
buildPkgs = if initialBuild then pkgsList.pinnedPkgs else pkgs;
|
buildPkgs = if initialBuild then pkgsList.pinnedPkgs else pkgs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||||
|
|
||||||
{ arch, buildPkgs, crossPkgs, crossStaticPkgs, initialBuild, pinnedPkgs } @ args:
|
{ arch, buildPkgs, crossPkgs, crossStaticPkgs, initialBuild, pinnedPkgs
|
||||||
|
, nixOnDroidChannelURL, nixpkgsChannelURL
|
||||||
|
} @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
callPackage = buildPkgs.lib.callPackageWith (args // pkgs);
|
callPackage = buildPkgs.lib.callPackageWith (args // pkgs);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||||
|
|
||||||
{ buildPkgs, initialBuild, nixDirectory }:
|
{ buildPkgs, initialBuild, nixDirectory, nixOnDroidChannelURL, nixpkgsChannelURL }:
|
||||||
|
|
||||||
let
|
let
|
||||||
instDir = "/data/data/com.termux.nix/files/usr";
|
instDir = "/data/data/com.termux.nix/files/usr";
|
||||||
|
|
@ -19,7 +19,10 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
callPackage = buildPkgs.lib.callPackageWith (buildPkgs // {
|
callPackage = buildPkgs.lib.callPackageWith (buildPkgs // {
|
||||||
inherit groupName initialBuild instDir packageInfo shell writeTextDir userName;
|
inherit initialBuild instDir packageInfo writeTextDir;
|
||||||
|
inherit groupName userName;
|
||||||
|
inherit shell;
|
||||||
|
inherit nixOnDroidChannelURL nixpkgsChannelURL;
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,12 @@
|
||||||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||||
|
|
||||||
{ initialBuild, instDir, packageInfo, writeTextDir }:
|
{ initialBuild
|
||||||
|
, nixpkgsChannelURL, nixOnDroidChannelURL
|
||||||
|
, instDir
|
||||||
|
, packageInfo
|
||||||
|
, writeTextDir
|
||||||
|
}:
|
||||||
|
|
||||||
writeTextDir "usr/lib/login-inner" ''
|
writeTextDir "usr/lib/login-inner" ''
|
||||||
set -e
|
set -e
|
||||||
|
|
@ -23,8 +28,8 @@ writeTextDir "usr/lib/login-inner" ''
|
||||||
export NIX_SSL_CERT_FILE=${packageInfo.cacert}
|
export NIX_SSL_CERT_FILE=${packageInfo.cacert}
|
||||||
|
|
||||||
echo "Installing and updating nix-channels..."
|
echo "Installing and updating nix-channels..."
|
||||||
${packageInfo.nix}/bin/nix-channel --add https://nixos.org/channels/nixos-19.03 nixpkgs
|
${packageInfo.nix}/bin/nix-channel --add ${nixpkgsChannelURL} nixpkgs
|
||||||
${packageInfo.nix}/bin/nix-channel --add https://github.com/t184256/nix-on-droid-bootstrap/archive/master.tar.gz nix-on-droid
|
${packageInfo.nix}/bin/nix-channel --add ${nixOnDroidChannelURL} nix-on-droid
|
||||||
${packageInfo.nix}/bin/nix-channel --update
|
${packageInfo.nix}/bin/nix-channel --update
|
||||||
|
|
||||||
echo "Installing nix-on-droid.basic-environment..."
|
echo "Installing nix-on-droid.basic-environment..."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue