nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 46 lines 1.9 kB view raw
1{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, pkg-config, gettext, imagemagick, curl, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, xercesc, xdg-utils, hicolor-icon-theme }: 2stdenv.mkDerivation rec { 3 pname = "enigma"; 4 version = "1.30"; 5 6 src = fetchurl { 7 url = "https://github.com/Enigma-Game/Enigma/releases/download/${version}/Enigma-${version}-src.tar.gz"; 8 sha256 = "rmS5H7wrEJcAcdDXjtW07enuOGjeLm6VaVRvxYQ3+K8="; 9 }; 10 11 patches = [ 12 # fix format string security warning (turned into error) 13 (fetchpatch { 14 url = "https://github.com/Enigma-Game/Enigma/pull/70/commits/d25051eb6228c885e779a9674f8ee3979da30663.patch"; 15 sha256 = "L5C4NCZDDUKji9Tg4geKaiw3CkSY6rCoawqGKqR4dFM="; 16 }) 17 ]; 18 19 nativeBuildInputs = [ pkg-config gettext makeWrapper imagemagick ]; 20 buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libpng xercesc curl xdg-utils ]; 21 22 # The configure script of enigma uses pkg-config to determine the header 23 # directories of SDL2. However, pkg-config only returns the path to the core 24 # SDL2 library, not to the additional libraries SDL2_ttf, SDL2_image and 25 # SDL2_mixer. In contrast, sdl2-config does return the correct list of paths. 26 # We don't use configureFlags here so that the shell can correctly carry 27 # out the interpolation. 28 preConfigure = '' 29 export SDL_CFLAGS=$(sdl2-config --cflags) 30 ''; 31 32 postInstall = '' 33 rm -r $out/include 34 # make xdg-open overrideable at runtime 35 wrapProgram $out/bin/enigma --suffix PATH : "${lib.makeBinPath [ xdg-utils ]}" 36 ''; 37 38 meta = with lib; { 39 description = "Puzzle game inspired by Oxyd on the Atari ST and Rock'n'Roll on the Amiga"; 40 license = with licenses; [ gpl2 free ]; # source + bundles libs + art 41 platforms = platforms.unix; 42 broken = stdenv.targetPlatform.isDarwin; 43 maintainers = with maintainers; [ iblech ]; 44 homepage = "https://www.nongnu.org/enigma/"; 45 }; 46}