git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #119112 from squalus/darwin-scummvm

scummvm: support darwin

commit5fd77b2c73f6922ed82ace4c44a7845560e3f12c authorPavol Rusnak <pavol@rusnak.io> dateWed 14 Apr 2021, 22:48 (6 years ago) parent81d784f3ac4604
2 files changed+14−4
pkgs/games/scummvm/default.nix+10−3 pkgs/top-level/all-packages.nix+4−1
pkgs/games/scummvm/default.nix+10−3
@@ -1,5 +1,6 @@
11{ lib, stdenv, fetchurl, nasm
22, alsaLib, curl, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libvorbis, libGLU, libGL, SDL2, zlib
3+, Cocoa, AudioToolbox, Carbon, CoreMIDI, AudioUnit, cctools
34}:
45
56stdenv.mkDerivation rec {
@@ -13,8 +14,12 @@ stdenv.mkDerivation rec {
1314
1415 nativeBuildInputs = [ nasm ];
1516
16− buildInputs = [
17− alsaLib curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libvorbis libGLU libGL SDL2 zlib
17+ buildInputs = lib.optionals stdenv.isLinux [
18+ alsaLib
19+ ] ++ lib.optionals stdenv.isDarwin [
20+ Cocoa AudioToolbox Carbon CoreMIDI AudioUnit
21+ ] ++ [
22+ curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libvorbis libGLU libGL SDL2 zlib
1823 ];
1924
2025 dontDisableStatic = true;
@@ -30,6 +35,8 @@ stdenv.mkDerivation rec {
3035 # They use 'install -s', that calls the native strip instead of the cross
3136 postConfigure = ''
3237 sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}/" ports.mk
38+ '' + lib.optionalString stdenv.isDarwin ''
39+ substituteInPlace config.mk --replace x86_64-apple-darwin-ranlib ${cctools}/bin/ranlib
3340 '';
3441
3542 meta = with lib; {
@@ -37,6 +44,6 @@ stdenv.mkDerivation rec {
3744 homepage = "https://www.scummvm.org/";
3845 license = licenses.gpl2;
3946 maintainers = [ maintainers.peterhoeg ];
40− platforms = platforms.linux;
47+ platforms = platforms.unix;
4148 };
4249}
pkgs/top-level/all-packages.nix+4−1
@@ -27961,7 +27961,10 @@ in
2796127961 tk = tk-8_6;
2796227962 };
2796327963
27964− scummvm = callPackage ../games/scummvm { };
27964+ scummvm = callPackage ../games/scummvm {
27965+ inherit (darwin) cctools;
27966+ inherit (darwin.apple_sdk.frameworks) Cocoa AudioToolbox Carbon CoreMIDI AudioUnit;
27967+ };
2796527968
2796627969 inherit (callPackage ../games/scummvm/games.nix { })
2796727970 beneath-a-steel-sky