summary refs log tree commit diff
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2021-04-14 22:48:47 +0200
committerGitHub <noreply@github.com>2021-04-14 22:48:47 +0200
commit5fd77b2c73f6922ed82ace4c44a7845560e3f12c (patch)
treeb4bd5de0a572180e975e148291eae2160a92ee6f
parent81d784ffafdd93c03ec4fc8940d346d1ac0cdb1c (diff)
parent3ac4604a52323b960708d12e9937d478f60d9fd4 (diff)
downloadnixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.tar
nixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.tar.gz
nixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.tar.bz2
nixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.tar.lz
nixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.tar.xz
nixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.tar.zst
nixpkgs-5fd77b2c73f6922ed82ace4c44a7845560e3f12c.zip
Merge pull request #119112 from squalus/darwin-scummvm
scummvm: support darwin
-rw-r--r--pkgs/games/scummvm/default.nix13
-rw-r--r--pkgs/top-level/all-packages.nix5
2 files changed, 14 insertions, 4 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;
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 07a1b923ca3..98b92758541 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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