mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
Remove dependency on coreutils from bootstrap
The Nix distribution tarball no longer includes coreutils.
This commit is contained in:
parent
6a97d9e697
commit
dd0d1194a8
3 changed files with 10 additions and 10 deletions
|
|
@ -3,7 +3,7 @@
|
|||
{ config, lib, customPkgs, writeText }:
|
||||
|
||||
let
|
||||
inherit (customPkgs.packageInfo) cacert coreutils nix;
|
||||
inherit (customPkgs.packageInfo) cacert nix;
|
||||
in
|
||||
|
||||
writeText "login-inner" ''
|
||||
|
|
@ -38,16 +38,20 @@ writeText "login-inner" ''
|
|||
${nix}/bin/nix-channel --add ${config.build.channel.nix-on-droid} nix-on-droid
|
||||
${nix}/bin/nix-channel --update nix-on-droid
|
||||
|
||||
echo "Copying default nix-on-droid config..."
|
||||
${coreutils}/bin/mkdir --parents $HOME/.config/nixpkgs
|
||||
${coreutils}/bin/cp $(${nix}/bin/nix-instantiate --eval --expr "<nix-on-droid/modules/environment/login/nix-on-droid.nix.default>") $HOME/.config/nixpkgs/nix-on-droid.nix
|
||||
${coreutils}/bin/chmod u+w $HOME/.config/nixpkgs/nix-on-droid.nix
|
||||
DEFAULT_CONFIG=$(${nix}/bin/nix-instantiate --eval --expr "<nix-on-droid/modules/environment/login/nix-on-droid.nix.default>")
|
||||
|
||||
echo "Installing first nix-on-droid generation..."
|
||||
${nix}/bin/nix --extra-experimental-features nix-command \
|
||||
build --no-link --file "<nix-on-droid>" nix-on-droid
|
||||
$(${nix}/bin/nix --extra-experimental-features nix-command \
|
||||
path-info --file "<nix-on-droid>" nix-on-droid)/bin/nix-on-droid switch
|
||||
path-info --file "<nix-on-droid>" nix-on-droid)/bin/nix-on-droid switch -f $DEFAULT_CONFIG
|
||||
|
||||
. "${config.user.home}/.nix-profile/etc/profile.d/nix-on-droid-session-init.sh"
|
||||
|
||||
echo "Copying default nix-on-droid config..."
|
||||
mkdir --parents $HOME/.config/nixpkgs
|
||||
cp $DEFAULT_CONFIG $HOME/.config/nixpkgs/nix-on-droid.nix
|
||||
chmod u+w $HOME/.config/nixpkgs/nix-on-droid.nix
|
||||
|
||||
echo
|
||||
echo "Congratulations! Now you have Nix installed with some default packages like bashInteractive, \
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ runCommand "bootstrap" { } ''
|
|||
chmod --recursive u+w $out/nix
|
||||
|
||||
ln --symbolic ${packageInfo.bash}/bin/sh $out/bin/sh
|
||||
ln --symbolic ${packageInfo.coreutils}/bin/env $out/usr/bin/env
|
||||
|
||||
install -D -m 0755 ${prootTermux}/bin/proot-static $out/bin/proot-static
|
||||
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ stdenv.mkDerivation {
|
|||
CACERT=$(find ${buildRootDirectory}/nix/store -path '*-nss-cacert-*/ca-bundle.crt' | sed 's,^${buildRootDirectory},,')
|
||||
PKG_BASH=$(find ${buildRootDirectory}/nix/store -path '*/bin/bash' | sed 's,^${buildRootDirectory},,')
|
||||
PKG_BASH=''${PKG_BASH%/bin/bash}
|
||||
PKG_COREUTILS=$(find ${buildRootDirectory}/nix/store -path '*/bin/env' | sed 's,^${buildRootDirectory},,')
|
||||
PKG_COREUTILS=''${PKG_COREUTILS%/bin/env}
|
||||
PKG_NIX=$(find ${buildRootDirectory}/nix/store -path '*/bin/nix' | sed 's,^${buildRootDirectory},,')
|
||||
PKG_NIX=''${PKG_NIX%/bin/nix}
|
||||
|
||||
|
|
@ -53,7 +51,6 @@ stdenv.mkDerivation {
|
|||
{
|
||||
bash = "$PKG_BASH";
|
||||
cacert = "$CACERT";
|
||||
coreutils = "$PKG_COREUTILS";
|
||||
nix = "$PKG_NIX";
|
||||
}
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue