From 03b2a82ca9014f0d047c7167c4fa5e402ad06b8c Mon Sep 17 00:00:00 2001 From: Yureka Date: Thu, 8 Dec 2022 18:36:59 +0100 Subject: [PATCH] runInLinuxVM: fix on musl --- pkgs/build-support/vm/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 06e1deb47845..45dc2fe6c4ed 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -35,10 +35,12 @@ rec { mkdir -p $out/lib # Copy what we need from Glibc. - cp -p ${pkgs.stdenv.cc.libc}/lib/ld-linux*.so.? $out/lib - cp -p ${pkgs.stdenv.cc.libc}/lib/libc.so.* $out/lib - cp -p ${pkgs.stdenv.cc.libc}/lib/libm.so.* $out/lib - cp -p ${pkgs.stdenv.cc.libc}/lib/libresolv.so.* $out/lib + cp -p \ + ${pkgs.stdenv.cc.libc}/lib/ld-*.so.? \ + ${pkgs.stdenv.cc.libc}/lib/libc.so.* \ + ${pkgs.stdenv.cc.libc}/lib/libm.so.* \ + ${pkgs.stdenv.cc.libc}/lib/libresolv.so.* \ + $out/lib # Copy BusyBox. cp -pd ${pkgs.busybox}/bin/* $out/bin @@ -49,7 +51,7 @@ rec { for i in $out/bin/*; do if [ -f "$i" -a ! -L "$i" ]; then echo "patching $i..." - patchelf --set-interpreter $out/lib/ld-linux*.so.? --set-rpath $out/lib $i || true + patchelf --set-interpreter $out/lib/ld-*.so.? --set-rpath $out/lib $i || true fi done ''; # */