git.iko.soy/typeable/nixpkgs
on master help sign in
scummvm: support darwin
commit3ac4604a52323b960708d12e9937d478f60d9fd4 authorsqualus <squalus@tuta.io> dateSun 11 Apr 2021, 00:25 (6 years ago) parent7644480
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
@@ -27890,7 +27890,10 @@ in
2789027890 tk = tk-8_6;
2789127891 };
2789227892
27893− scummvm = callPackage ../games/scummvm { };
27893+ scummvm = callPackage ../games/scummvm {
27894+ inherit (darwin) cctools;
27895+ inherit (darwin.apple_sdk.frameworks) Cocoa AudioToolbox Carbon CoreMIDI AudioUnit;
27896+ };
2789427897
2789527898 inherit (callPackage ../games/scummvm/games.nix { })
2789627899 beneath-a-steel-sky