1 { lib, stdenv, fetchFromGitHub, fetchpatch, 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-8/q16MwHhbbmUxiwJOHkjNxrnBB4grMa7qw/n3KLvRc=";
18 # Fix building with Freetype 2.13.3. Remove after next release.
20 url = "https://github.com/scummvm/scummvm/commit/65977961b20ba97b1213b5267da0cb1efb49063b.patch?full_index=1";
21 hash = "sha256-e5dJd3gP8OAD3hEJlvOhMemsNErCKTn7avlprApFig0=";
25 nativeBuildInputs = [ nasm ];
27 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
29 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
30 Cocoa AudioToolbox Carbon CoreMIDI AudioUnit
32 curl freetype flac fluidsynth libjpeg libmad libmpeg2 libogg libtheora libvorbis SDL2 zlib
35 dontDisableStatic = true;
37 enableParallelBuilding = true;
39 configurePlatforms = [ "host" ];
44 # They use 'install -s', that calls the native strip instead of the cross
46 sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}/" ports.mk
47 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
48 substituteInPlace config.mk \
49 --replace x86_64-apple-darwin-ranlib ${cctools}/bin/ranlib \
50 --replace aarch64-apple-darwin-ranlib ${cctools}/bin/ranlib
53 NIX_CFLAGS_COMPILE = [ "-fpermissive" ];
56 description = "Program to run certain classic graphical point-and-click adventure games (such as Monkey Island)";
57 mainProgram = "scummvm";
58 homepage = "https://www.scummvm.org/";
59 license = licenses.gpl2Plus;
60 maintainers = [ maintainers.peterhoeg ];
61 platforms = platforms.unix;