Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 93 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 nasm, 6 alsa-lib, 7 curl, 8 flac, 9 fluidsynth, 10 freetype, 11 libjpeg, 12 libmad, 13 libmpeg2, 14 libogg, 15 libtheora, 16 libvorbis, 17 libGLU, 18 libGL, 19 libX11, 20 SDL2, 21 zlib, 22 cctools, 23 nix-update-script, 24}: 25 26stdenv.mkDerivation rec { 27 pname = "scummvm"; 28 version = "2.9.1"; 29 30 src = fetchFromGitHub { 31 owner = "scummvm"; 32 repo = "scummvm"; 33 rev = "v${version}"; 34 hash = "sha256-+MM47piuXuIBmAQd0g/cAg5t02qSQ0sw/DwFrMUSIAA="; 35 }; 36 37 nativeBuildInputs = [ nasm ]; 38 39 buildInputs = 40 lib.optionals stdenv.hostPlatform.isLinux [ 41 alsa-lib 42 libGLU 43 libGL 44 ] 45 ++ [ 46 curl 47 freetype 48 flac 49 fluidsynth 50 libjpeg 51 libmad 52 libmpeg2 53 libogg 54 libtheora 55 libvorbis 56 SDL2 57 libX11 58 zlib 59 ]; 60 61 dontDisableStatic = true; 62 63 enableParallelBuilding = true; 64 65 configurePlatforms = [ "host" ]; 66 configureFlags = [ 67 "--enable-release" 68 ]; 69 70 # They use 'install -s', that calls the native strip instead of the cross 71 postConfigure = '' 72 sed -i "s/-c -s/-c -s --strip-program=''${STRIP@Q}/" ports.mk 73 '' 74 + lib.optionalString stdenv.hostPlatform.isDarwin '' 75 substituteInPlace config.mk \ 76 --replace-fail ${stdenv.hostPlatform.config}-ranlib ${cctools}/bin/ranlib 77 ''; 78 79 NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; 80 81 passthru = { 82 updateScript = nix-update-script { }; 83 }; 84 85 meta = with lib; { 86 description = "Program to run certain classic graphical point-and-click adventure games (such as Monkey Island)"; 87 mainProgram = "scummvm"; 88 homepage = "https://www.scummvm.org/"; 89 license = licenses.gpl2Plus; 90 maintainers = [ maintainers.peterhoeg ]; 91 platforms = platforms.unix; 92 }; 93}