diff options
author | Rick van Schijndel <rol3517@gmail.com> | 2022-05-05 22:16:44 +0200 |
---|---|---|
committer | Rick van Schijndel <rol3517@gmail.com> | 2022-05-09 20:07:20 +0200 |
commit | 4729cb69e35e67bcc0221da00953524d62402a89 (patch) | |
tree | 94964d97ff43147a1473fa391598f85208f5bc6e /pkgs/development/libraries/SDL2 | |
parent | e2a1802777ecddcd3fce0d3d066cf8fc8c481dc9 (diff) | |
download | nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.tar nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.tar.gz nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.tar.bz2 nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.tar.lz nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.tar.xz nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.tar.zst nixpkgs-4729cb69e35e67bcc0221da00953524d62402a89.zip |
SDL2: fix cross-compilation
Diffstat (limited to 'pkgs/development/libraries/SDL2')
-rw-r--r-- | pkgs/development/libraries/SDL2/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix index 1ce2b1525f0..75e0cd1c02a 100644 --- a/pkgs/development/libraries/SDL2/default.nix +++ b/pkgs/development/libraries/SDL2/default.nix @@ -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 ]; |