Skip to content

Commit

Permalink
vmware-workstation: use system X11 libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
js6pak authored and vifino committed Oct 15, 2024
1 parent 29a10b3 commit af32e9a
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions pkgs/applications/virtualization/vmware-workstation/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
, readline70
, xz
, cups
, glibc
, libaio
, vulkan-loader
, alsa-lib
, libpulseaudio
, libxcrypt-legacy
, libGL
, numactl
, libX11
, libXi
, xorg
, kmod
, python3
, autoPatchelfHook
Expand Down Expand Up @@ -73,17 +71,28 @@ stdenv.mkDerivation rec {
readline
xz
cups
glibc
libaio
vulkan-loader
alsa-lib
libpulseaudio
libxcrypt-legacy
libGL
numactl
libX11
libXi
kmod
xorg.libX11
xorg.libXau
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXdmcp
xorg.libXext
xorg.libXfixes
xorg.libXft
xorg.libXinerama
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXScrnSaver
xorg.libXtst
];

nativeBuildInputs = [ python3 vmware-unpack-env autoPatchelfHook makeWrapper ]
Expand Down Expand Up @@ -217,8 +226,8 @@ stdenv.mkDerivation rec {
--add-needed ${libpulseaudio}/lib/libpulse.so.0 \
--add-needed ${libGL}/lib/libEGL.so.1 \
--add-needed ${numactl}/lib/libnuma.so.1 \
--add-needed ${libX11}/lib/libX11.so.6 \
--add-needed ${libXi}/lib/libXi.so.6 \
--add-needed ${xorg.libX11}/lib/libX11.so.6 \
--add-needed ${xorg.libXi}/lib/libXi.so.6 \
--add-needed ${libGL}/lib/libGL.so.1 \
$out/lib/vmware/bin/$binary
done
Expand Down Expand Up @@ -345,6 +354,14 @@ stdenv.mkDerivation rec {
rm $out/lib/vmware/bin/vmware-vmx
ln -s /run/wrappers/bin/vmware-vmx $out/lib/vmware/bin/vmware-vmx
# Remove shipped X11 libraries
for lib in $out/lib/vmware/lib/* $out/lib/vmware-ovftool/lib*.so*; do
lib_name="$(basename "$lib")"
if [[ "$lib_name" == libX* || "$lib_name" == libxcb* ]]; then
rm -rf "$lib"
fi
done
runHook postInstall
'';

Expand Down

0 comments on commit af32e9a

Please sign in to comment.