SDL2: fix cross-compilation
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
, audiofile
|
||||
, libiconv
|
||||
, withStatic ? false
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
# NOTE: When editing this expression see if the same change applies to
|
||||
@@ -76,6 +77,15 @@ 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)' "${buildPackages.wayland-scanner}/bin/wayland-scanner"
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
depsBuildBuild = [ pkg-config ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ] ++ optionals waylandSupport [ wayland ];
|
||||
|
||||
Reference in New Issue
Block a user