From cb0e81b5b6c60ad25493ba5a95be58ec0ef9058e Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 22 Jul 2021 03:37:52 +0300 Subject: [PATCH] mc: add libX11 with patchelf --- pkgs/tools/misc/mc/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix index 6cbe693fb604..56844efc6cec 100644 --- a/pkgs/tools/misc/mc/default.nix +++ b/pkgs/tools/misc/mc/default.nix @@ -57,9 +57,14 @@ stdenv.mkDerivation rec { --replace /bin/rm ${coreutils}/bin/rm ''; - preFixup = '' + postFixup = '' # remove unwanted build-dependency references sed -i -e "s!PKG_CONFIG_PATH=''${PKG_CONFIG_PATH}!PKG_CONFIG_PATH=$(echo "$PKG_CONFIG_PATH" | sed -e 's/./0/g')!" $out/bin/mc + + # libX11.so is loaded dynamically so autopatch doesn't detect it + patchelf \ + --add-needed ${libX11}/lib/libX11.so \ + $out/bin/mc ''; meta = with lib; {