Merge pull request #186343 from trofi/fheroes2-locales

fheroes2: install localization and other port-specific files

authored by Sergei Trofimovich and committed by GitHub 0d7cb679 986a5d59

+12 -2
+12 -2
pkgs/games/fheroes2/default.nix
··· 1 1 { stdenv, lib, fetchFromGitHub 2 - , gettext, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, zlib 2 + , gettext, glibcLocalesUtf8, libpng, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, zlib 3 3 4 4 # updater only 5 5 , nix-update-script ··· 16 16 sha256 = "sha256-I79PoNE6GFvYD4jnsxKo7MsoPgVow8b8fTIiClOGnAI="; 17 17 }; 18 18 19 - buildInputs = [ gettext libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ]; 19 + buildInputs = [ gettext glibcLocalesUtf8 libpng SDL2 SDL2_image SDL2_mixer SDL2_ttf zlib ]; 20 20 21 21 makeFlags = [ 22 22 "FHEROES2_STRICT_COMPILATION=1" 23 + "FHEROES2_DATA=\"${placeholder "out"}/share/fheroes2\"" 23 24 ]; 24 25 25 26 enableParallelBuilding = true; 26 27 28 + postBuild = '' 29 + # Pick guaranteed to be present UTF-8 locale. 30 + # Otherwise `iconv` calls fail to produce valid translations. 31 + LANG=en_US.UTF_8 make -C files/lang 32 + ''; 33 + 27 34 installPhase = '' 28 35 runHook preInstall 29 36 30 37 install -Dm755 $PWD/src/dist/fheroes2 $out/bin/fheroes2 38 + 39 + install -Dm644 -t $out/share/fheroes2/files/lang $PWD/files/lang/*.mo 40 + install -Dm644 -t $out/share/fheroes2/files/data $PWD/files/data/resurrection.h2d 31 41 32 42 runHook postInstall 33 43 '';