Merge pull request #119112 from squalus/darwin-scummvm

scummvm: support darwin
This commit is contained in:
Pavol Rusnak 2021-04-14 22:48:47 +02:00 committed by GitHub
commit 5fd77b2c73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View file

@ -1,5 +1,6 @@
{ lib, stdenv, fetchurl, nasm
, alsaLib, curl, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libvorbis, libGLU, libGL, SDL2, zlib
, Cocoa, AudioToolbox, Carbon, CoreMIDI, AudioUnit, cctools
}:
stdenv.mkDerivation rec {
@ -13,8 +14,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ nasm ];
buildInputs = [
alsaLib curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libvorbis libGLU libGL SDL2 zlib
buildInputs = lib.optionals stdenv.isLinux [
alsaLib
] ++ lib.optionals stdenv.isDarwin [
Cocoa AudioToolbox Carbon CoreMIDI AudioUnit
] ++ [
curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libvorbis libGLU libGL SDL2 zlib
];
dontDisableStatic = true;
@ -30,6 +35,8 @@ stdenv.mkDerivation rec {
# They use 'install -s', that calls the native strip instead of the cross
postConfigure = ''
sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}/" ports.mk
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace config.mk --replace x86_64-apple-darwin-ranlib ${cctools}/bin/ranlib
'';
meta = with lib; {
@ -37,6 +44,6 @@ stdenv.mkDerivation rec {
homepage = "https://www.scummvm.org/";
license = licenses.gpl2;
maintainers = [ maintainers.peterhoeg ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -27961,7 +27961,10 @@ in
tk = tk-8_6;
};
scummvm = callPackage ../games/scummvm { };
scummvm = callPackage ../games/scummvm {
inherit (darwin) cctools;
inherit (darwin.apple_sdk.frameworks) Cocoa AudioToolbox Carbon CoreMIDI AudioUnit;
};
inherit (callPackage ../games/scummvm/games.nix { })
beneath-a-steel-sky