nix-on-droid/modules/environment
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
..
etc treewide: use consitent casing of Nix-on-Droid/nix-on-droid 2022-11-20 20:15:31 +01:00
login Unset LD_LIBRARY_PATH and LD_PRELOAD to avoid invalid ELF header 2024-11-27 00:09:33 +00:00
android-integration.nix modules/android-integration: termux-reload-settings 2024-07-07 21:38:38 +02:00
ca.nix treewide: apply nixpkgs-fmt 2022-10-04 00:43:13 +02:00
links.nix treewide: improve option descriptions 2022-11-20 20:15:31 +01:00
networking.nix update nixpkgs; applyPatches to fix toolchain (nixpkgs!269077) 2024-03-05 23:09:33 +01:00
nix.nix treewide: use consitent casing of Nix-on-Droid/nix-on-droid 2022-11-20 20:15:31 +01:00
path.nix modules/environment/path: add extraOutputsToInstall option 2023-05-16 18:23:38 +02:00
session-init.nix update inputs and copyrights to 24.05 2024-07-08 01:14:32 +02:00
shell.nix treewide: apply nixpkgs-fmt 2022-10-04 00:43:13 +02:00