mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 11:36:07 +01:00
Generate tarball for com.termux
It supports symlinks (yay)
This commit is contained in:
parent
5d88ff2519
commit
27867c79a7
4 changed files with 4 additions and 13 deletions
|
|
@ -43,7 +43,7 @@ with lib;
|
|||
|
||||
config = {
|
||||
|
||||
build.installationDir = "/data/data/com.termux.nix/files/usr";
|
||||
build.installationDir = "/data/data/com.termux/files/usr";
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ in
|
|||
|
||||
user = {
|
||||
group = "nix-on-droid";
|
||||
home = "/data/data/com.termux.nix/files/home";
|
||||
home = "/data/data/com.termux/files/home";
|
||||
userName = "nix-on-droid";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (c) 2019-2024, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||
|
||||
{ lib, runCommand, zip, bootstrap, targetSystem }:
|
||||
{ lib, runCommand, gnutar, bootstrap, targetSystem }:
|
||||
|
||||
let
|
||||
arch = lib.strings.removeSuffix "-linux" targetSystem;
|
||||
|
|
@ -8,5 +8,5 @@ in
|
|||
runCommand "bootstrap-zip" { } ''
|
||||
mkdir $out
|
||||
cd ${bootstrap}
|
||||
${zip}/bin/zip -q -9 -r $out/bootstrap-${arch} ./* ./.l2s
|
||||
${gnutar}/bin/tar czf $out/bootstrap-${arch}.tar.gz ./* ./.l2s
|
||||
''
|
||||
|
|
|
|||
|
|
@ -22,13 +22,4 @@ runCommand "bootstrap" { } ''
|
|||
cp --dereference --recursive $out/etc/static $out/etc/.static.tmp
|
||||
rm $out/etc/static
|
||||
mv $out/etc/.static.tmp $out/etc/static
|
||||
|
||||
find $out -executable -type f | sed s@^$out/@@ > $out/EXECUTABLES.txt
|
||||
|
||||
find $out -type l | while read -r LINK; do
|
||||
LNK=''${LINK#$out/}
|
||||
TGT=$(readlink "$LINK")
|
||||
echo "$TGT←$LNK" >> $out/SYMLINKS.txt
|
||||
rm "$LINK"
|
||||
done
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue