cataclysm-dda: build recipe enhancements & gcc5 support
- Remove redundant platform check; meta.platforms is sufficient - Use postPatch rather than override patchPhase entirely - Strip -Werror - Move build-time only dependencies to nativeBuildInputs This also fixes gcc5 build, which fails due to a deprecated-declarations warning (see https://hydra.nixos.org/build/33117020/nixlog/2/raw).
This commit is contained in:
parent
b81400e960
commit
18b35bd741
@ -1,15 +1,7 @@
|
|||||||
{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
|
{ fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
|
||||||
SDL2_mixer, freetype, gettext }:
|
SDL2_mixer, freetype, gettext }:
|
||||||
|
|
||||||
let architecture =
|
stdenv.mkDerivation rec {
|
||||||
if stdenv.system == "i686-linux" then
|
|
||||||
"linux32"
|
|
||||||
else if stdenv.system == "x86_64-linux" then
|
|
||||||
"linux64"
|
|
||||||
else
|
|
||||||
abort "currently only linux 32-bit and 64-bit are supported";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
|
||||||
version = "0.C";
|
version = "0.C";
|
||||||
name = "cataclysm-dda-${version}";
|
name = "cataclysm-dda-${version}";
|
||||||
|
|
||||||
@ -20,13 +12,15 @@ in stdenv.mkDerivation rec {
|
|||||||
sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
|
sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ makeWrapper pkgconfig ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ];
|
nativeBuildInputs = [ makeWrapper pkgconfig ];
|
||||||
|
|
||||||
patchPhase = ''
|
buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
substituteAllInPlace lang/compile_mo.sh \
|
sed -i Makefile \
|
||||||
--replace msgfmt ${gettext}/msgfmt
|
-e 's,-Werror,,g' \
|
||||||
sed -i -e 's|DATA_PREFIX=$(PREFIX)/share/cataclysm-dda/|DATA_PREFIX=$(PREFIX)/share/|g' Makefile
|
-e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";
|
makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";
|
||||||
|
Loading…
Reference in New Issue
Block a user