diff options
author | Ingo Blechschmidt <iblech@speicherleck.de> | 2022-04-02 19:51:03 +0200 |
---|---|---|
committer | Ingo Blechschmidt <iblech@speicherleck.de> | 2022-04-02 19:56:17 +0200 |
commit | ba46176d4e10a3786819e4cd580475f592421add (patch) | |
tree | d0e55d162e70c438e3d676f135b328c22e4cda28 /pkgs/games/enigma | |
parent | 8ba23e138d9714bf309facf0003d69b1f8b86265 (diff) |
enigma: 1.30-alpha -> 1.30
Diffstat (limited to 'pkgs/games/enigma')
-rw-r--r-- | pkgs/games/enigma/default.nix | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/pkgs/games/enigma/default.nix b/pkgs/games/enigma/default.nix index 131bd00e1857c..247d7b9dee196 100644 --- a/pkgs/games/enigma/default.nix +++ b/pkgs/games/enigma/default.nix @@ -1,20 +1,33 @@ -{ lib, stdenv, fetchurl, makeWrapper, pkg-config, gettext, imagemagick, curl, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, xercesc, xdg-utils, hicolor-icon-theme }: +{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, pkg-config, gettext, imagemagick, curl, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, xercesc, xdg-utils, hicolor-icon-theme }: stdenv.mkDerivation rec { pname = "enigma"; - version = "1.30-alpha"; + version = "1.30"; src = fetchurl { - url = "https://github.com/Enigma-Game/Enigma/releases/download/${version}/${pname}-${version}.tar.gz"; - sha256 = "1zyk3j43gzfr1lhc6g13j7qai5f33fv5xm5735nnznaqvaz17949"; + url = "https://github.com/Enigma-Game/Enigma/releases/download/${version}/Enigma-${version}-src.tar.gz"; + sha256 = "rmS5H7wrEJcAcdDXjtW07enuOGjeLm6VaVRvxYQ3+K8="; }; + patches = [ + # fix format string security warning (turned into error) + (fetchpatch { + url = "https://github.com/Enigma-Game/Enigma/pull/70/commits/d25051eb6228c885e779a9674f8ee3979da30663.patch"; + sha256 = "L5C4NCZDDUKji9Tg4geKaiw3CkSY6rCoawqGKqR4dFM="; + }) + ]; + nativeBuildInputs = [ pkg-config gettext makeWrapper imagemagick ]; buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf libpng xercesc curl xdg-utils ]; - # For some reason (might be related to the alpha status), some includes - # which are required by lib-src/enigma-core are not picked up by the - # configure script. Hence we add them manually. - CPPFLAGS = "-I${SDL2.dev}/include/SDL2 -I${SDL2_ttf}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_mixer}/include/SDL2"; + # The configure script of enigma uses pkg-config to determine the header + # directories of SDL2. However, pkg-config only returns the path to the core + # SDL2 library, not to the additional libraries SDL2_ttf, SDL2_image and + # SDL2_mixer. In contrast, sdl2-config does return the correct list of paths. + # We don't use configureFlags here so that the shell can correctly carry + # out the interpolation. + preConfigure = '' + export SDL_CFLAGS=$(sdl2-config --cflags) + ''; postInstall = '' rm -r $out/include |