summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorsqualus <squalus@tuta.io>2021-04-11 00:25:38 -0700
committersqualus <squalus@tuta.io>2021-04-11 23:21:01 -0700
commit3ac4604a52323b960708d12e9937d478f60d9fd4 (patch)
tree7d75ad6c73a7bebdfc055ec24e474ecc0e595a96 /pkgs/games
parent764448055551a4c664a1b0e2cecfc61731b32c5d (diff)
downloadnixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.tar
nixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.tar.gz
nixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.tar.bz2
nixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.tar.lz
nixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.tar.xz
nixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.tar.zst
nixpkgs-3ac4604a52323b960708d12e9937d478f60d9fd4.zip
scummvm: support darwin
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/scummvm/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/games/scummvm/default.nix b/pkgs/games/scummvm/default.nix
index 20d781db23d..68ccb894d99 100644
--- a/pkgs/games/scummvm/default.nix
+++ b/pkgs/games/scummvm/default.nix
@@ -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;
   };
 }