mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 12:19:54 +00:00
nix: update to rename libs dependencies and to remove libunwind from .so files
This commit is contained in:
parent
8097611207
commit
22ee465d3b
1 changed files with 17 additions and 3 deletions
20
flake.nix
20
flake.nix
|
@ -116,11 +116,25 @@
|
|||
# find ${androidPkgs.gmp6.override { withStatic = true; }}/lib -name "*.a" -exec cp {} $out/_pkg \;
|
||||
# find ${androidIconv}/lib -name "*.a" -exec cp {} $out/_pkg \;
|
||||
# find ${androidPkgs.stdenv.cc.libc}/lib -name "*.a" -exec cp {} $out/_pkg \;
|
||||
echo "androidPkgs"
|
||||
ls -lha ${androidPkgs}
|
||||
echo ${androidPkgs.openssl}
|
||||
find ${androidPkgs.openssl.out}/lib -name "*.so" -exec cp {} $out/_pkg \;
|
||||
|
||||
${pkgs.patchelf}/bin/patchelf --remove-needed libunwind.so.1 $out/_pkg/libsimplex.so
|
||||
# remove the .1 and other version suffixes from .so's. Androids linker
|
||||
# doesn't play nice with them.
|
||||
for lib in $out/_pkg/*.so; do
|
||||
for dep in $(${pkgs.patchelf}/bin/patchelf --print-needed "$lib"); do
|
||||
if [[ "''${dep##*.so}" ]]; then
|
||||
echo "$lib : $dep -> ''${dep%%.so*}.so"
|
||||
chmod +w "$lib"
|
||||
${pkgs.patchelf}/bin/patchelf --replace-needed "$dep" "''${dep%%.so*}.so" "$lib"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
for lib in $out/_pkg/*.so; do
|
||||
chmod +w "$lib"
|
||||
${pkgs.patchelf}/bin/patchelf --remove-needed libunwind.so "$lib"
|
||||
done
|
||||
|
||||
${pkgs.tree}/bin/tree $out/_pkg
|
||||
(cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/pkg-aarch64-android-libsimplex.zip *)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue