diff --git a/pkgs/by-name/li/libvdpau/package.nix b/pkgs/by-name/li/libvdpau/package.nix index d1c177d5307b..08346479668f 100644 --- a/pkgs/by-name/li/libvdpau/package.nix +++ b/pkgs/by-name/li/libvdpau/package.nix @@ -42,7 +42,9 @@ stdenv.mkDerivation rec { "-Dmoduledir=${mesa.driverLink}/lib/vdpau" ]; - NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-lX11"; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + NIX_LDFLAGS = "-lX11"; + }; # The tracing library in this package must be conditionally loaded with dlopen(). # Therefore, we must restore the RPATH entry for the library itself that was removed by the patchelf hook.