1 { lib, stdenv, fetchFromGitHub, nasm
2 , alsa-lib, curl, flac, fluidsynth, freetype, libjpeg, libmad, libmpeg2, libogg, libtheora, libvorbis, libGLU, libGL, SDL2, zlib
3 , Cocoa, AudioToolbox, Carbon, CoreMIDI, AudioUnit, cctools
6 stdenv.mkDerivation rec {
10 src = fetchFromGitHub {
14 hash = "sha256-GVsvLAjb7pECd7uvPT9ubDFMIkiPWdU5owOafxk5iy0=";
17 nativeBuildInputs = [ nasm ];
19 buildInputs = lib.optionals stdenv.isLinux [
21 ] ++ lib.optionals stdenv.isDarwin [
22 Cocoa AudioToolbox Carbon CoreMIDI AudioUnit
24 curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libtheora libvorbis SDL2 zlib
27 dontDisableStatic = true;
29 enableParallelBuilding = true;
31 configurePlatforms = [ "host" ];
36 # They use 'install -s', that calls the native strip instead of the cross
38 sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}/" ports.mk
39 '' + lib.optionalString stdenv.isDarwin ''
40 substituteInPlace config.mk \
41 --replace x86_64-apple-darwin-ranlib ${cctools}/bin/ranlib \
42 --replace aarch64-apple-darwin-ranlib ${cctools}/bin/ranlib
46 description = "Program to run certain classic graphical point-and-click adventure games (such as Monkey Island)";
47 homepage = "https://www.scummvm.org/";
48 license = licenses.gpl2;
49 maintainers = [ maintainers.peterhoeg ];
50 platforms = platforms.unix;