SDL2: use wayland-scanner from PATH

Prevents having to use buildPackages, helps overriding wayland-scanner for whoever needs it.
main
Rick van Schijndel 2 years ago
parent 4729cb69e3
commit 7d5b75b12a
  1. 6
      pkgs/development/libraries/SDL2/default.nix

@ -22,6 +22,7 @@
, waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid , waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
, wayland , wayland
, wayland-protocols , wayland-protocols
, wayland-scanner
, drmSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid , drmSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
, libdrm , libdrm
, mesa , mesa
@ -49,7 +50,6 @@
, audiofile , audiofile
, libiconv , libiconv
, withStatic ? false , withStatic ? false
, buildPackages
}: }:
# NOTE: When editing this expression see if the same change applies to # NOTE: When editing this expression see if the same change applies to
@ -81,14 +81,14 @@ stdenv.mkDerivation rec {
# Fix running wayland-scanner for the build platform when cross-compiling. # Fix running wayland-scanner for the build platform when cross-compiling.
# See comment here: https://github.com/libsdl-org/SDL/issues/4860#issuecomment-1119003545 # See comment here: https://github.com/libsdl-org/SDL/issues/4860#issuecomment-1119003545
substituteInPlace configure \ substituteInPlace configure \
--replace '$(WAYLAND_SCANNER)' "${buildPackages.wayland-scanner}/bin/wayland-scanner" --replace '$(WAYLAND_SCANNER)' 'wayland-scanner'
''; '';
strictDeps = true; strictDeps = true;
depsBuildBuild = [ pkg-config ]; depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland ]; nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland wayland-scanner ];
propagatedBuildInputs = dlopenPropagatedBuildInputs; propagatedBuildInputs = dlopenPropagatedBuildInputs;

Loading…
Cancel
Save