nix-on-droid/modules
Kovacsics Robert 55cc8f0210 Unset LD_LIBRARY_PATH and LD_PRELOAD to avoid invalid ELF header
The error

    /data/data/com.termux/files/nix/bin/sh: error while loading shared libraries: /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc.so: invalid ELF header

it seems to happen  because of

    LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so

which doesn't support the .so file being a linker script

    .../files/nix $ cat ./nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc.so
    /* GNU ld script
       Use the shared library, but some functions are only in
       the static library, so try that secondarily.  */
    OUTPUT_FORMAT(elf64-littleaarch64)
    GROUP ( /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc.so.6 /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/libc_nonshared.a  AS_NEEDED ( /nix/store/6afvzgx3himw7584k9zmfxmqd86b1z7j-glibc-2.34-210/lib/ld-linux-aarch64.so.1 ) )
2024-11-27 00:09:33 +00:00
..
build Use custom nix installation path to avoid overlap with termux 2024-11-27 00:09:33 +00:00
environment Unset LD_LIBRARY_PATH and LD_PRELOAD to avoid invalid ELF header 2024-11-27 00:09:33 +00:00
lib-bash Relicense to MIT License 2020-01-09 22:04:22 +01:00
nixpkgs treewide: improve option descriptions 2022-11-20 20:15:31 +01:00
default.nix modules, ...: get rid of config.build.arch 2024-06-30 20:29:37 +02:00
home-manager.nix home-manager: Extend lib instead of pkgs.lib 2024-03-05 23:09:33 +01:00
module-list.nix modules/android-integration: add am command 2024-07-07 21:38:38 +02:00
terminal.nix modules/terminal: restrict colornames 2024-02-17 12:02:27 +01:00
time.nix treewide: format code 2022-11-06 20:26:32 +01:00
upgrade.nix update inputs and copyrights to 24.05 2024-07-08 01:14:32 +02:00
user.nix Generate tarball for com.termux 2024-11-27 00:09:16 +00:00
version.nix set stable version to 23.11 2024-03-05 23:09:33 +01:00