haskellPackages.SDL-mixer: fix build on darwin

SDL-mixer's configure script makes some darwin specific assumptions about
the layout of the SDL libraries which don't hold up with the way they are
packaged in nixpkgs. Since the way we are doing this on other platforms
works with the configure script and doesn't significantly differ from the
situation on darwin, we can just replace a string in a string comparison
to ensure the non-darwin code path is taken.
This commit is contained in:
sternenseemann 2021-08-06 01:43:59 +02:00 committed by sterni
parent 9a32fd5c49
commit e41518821d

View file

@ -206,6 +206,14 @@ self: super: {
'' + (drv.postPatch or "");
});
# Prevent darwin-specific configuration code path being taken which
# doesn't work with nixpkgs' SDL libraries
SDL-mixer = overrideCabal super.SDL-mixer (drv: {
postPatch = ''
substituteInPlace configure --replace xDarwin noDarwinSpecialCasing
'' + (drv.postPatch or "");
});
# Work around SDL_main.h redefining main to SDL_main
SDL-ttf = appendPatch super.SDL-ttf ./patches/SDL-ttf-darwin-hsc.patch;