Merge pull request #171705 from Mindavi/sdl2/cross
SDL2: fix cross-compilation
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
, waylandSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wayland-scanner
|
||||
, drmSupport ? stdenv.isLinux && !stdenv.hostPlatform.isAndroid
|
||||
, libdrm
|
||||
, mesa
|
||||
@@ -76,9 +77,18 @@ stdenv.mkDerivation rec {
|
||||
./find-headers.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Fix running wayland-scanner for the build platform when cross-compiling.
|
||||
# See comment here: https://github.com/libsdl-org/SDL/issues/4860#issuecomment-1119003545
|
||||
substituteInPlace configure \
|
||||
--replace '$(WAYLAND_SCANNER)' 'wayland-scanner'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ pkg-config ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland ];
|
||||
nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland wayland-scanner ];
|
||||
|
||||
propagatedBuildInputs = dlopenPropagatedBuildInputs;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user