1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 04:02:10 +00:00

scummvm: support darwin

This commit is contained in:
squalus 2021-04-11 00:25:38 -07:00
parent 7644480555
commit 3ac4604a52
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

@ -27890,7 +27890,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