forked from mirrors/nixpkgs
dwarf-fortress: Update to 0.34.11.
Somehow Dwarf Fortress suddenly started failing to use our libpng (or zlib). I tried all possible combinations (supplying them via LD_LIBRARY_PATH in the script) but it just won't work. This solution was found in the Archlinux bug tracker: It just symlinks all problematic .png files to their .bmp counterparts. It's ugly and *sadly* breaks tileset support (unless you convert them to bmp) but I think it's acceptable, as the whole expression is pretty problematic in terms of purity. Let's hope the next release of Dwarf Fortress will be easier to support. (fixes #710)
This commit is contained in:
parent
32ebe90fa1
commit
b98ae36d32
|
@ -1,13 +1,14 @@
|
|||
{stdenv, fetchurl, SDL, SDL_image, SDL_ttf, gtk, glib, mesa, openal, glibc, libsndfile}:
|
||||
{ stdenv, fetchurl, SDL, SDL_image, SDL_ttf, gtk, glib, mesa, openal, glibc, libsndfile
|
||||
, copyDataDirectory ? false }:
|
||||
|
||||
assert stdenv.system == "i686-linux";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dwarf-fortress-0.31.25";
|
||||
name = "dwarf-fortress-0.34.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.bay12games.com/dwarves/df_31_25_linux.tar.bz2";
|
||||
sha256 = "0d3klvf5n99j38pdhx9mak78px65aw47smck82jb92la97drmcg3";
|
||||
url = "http://www.bay12games.com/dwarves/df_34_11_linux.tar.bz2";
|
||||
sha256 = "1qk9vmdxzs0li81c8bglpj3m7aw9k71x1slf58hv2bz7hdndl3kj";
|
||||
};
|
||||
|
||||
phases = "unpackPhase patchPhase installPhase";
|
||||
|
@ -33,8 +34,16 @@ stdenv.mkDerivation rec {
|
|||
then export DF_DIR="\$XDG_DATA_HOME/df_linux"
|
||||
fi
|
||||
|
||||
# Recreate a directory sturctor reflecting the original distribution in the user directory
|
||||
|
||||
# Recreate a directory structure reflecting the original
|
||||
# distribution in the user directory (for modding support)
|
||||
${if copyDataDirectory then ''
|
||||
if [ ! -d "\$DF_DIR" ];
|
||||
then
|
||||
mkdir -p \$DF_DIR
|
||||
cp -r $out/share/df_linux/* \$DF_DIR/
|
||||
chmod -R u+rw \$DF_DIR/
|
||||
fi
|
||||
'' else ''
|
||||
# Link in the static stuff
|
||||
mkdir -p \$DF_DIR
|
||||
ln -sf $out/share/df_linux/libs \$DF_DIR/
|
||||
|
@ -64,6 +73,7 @@ stdenv.mkDerivation rec {
|
|||
# link in persistant data
|
||||
mkdir -p \$DF_DIR/save
|
||||
ln -s \$DF_DIR/save \$DF_DIR/data/
|
||||
''}
|
||||
|
||||
# now run Dwarf Fortress!
|
||||
export LD_LIBRARY_PATH=\$DF_DIR/df_linux/libs/:${SDL}/lib:${SDL_image}/lib/:${SDL_ttf}/lib/:${gtk}/lib/:${glib}/lib/:${mesa}/lib/:${openal}/lib/
|
||||
|
|
|
@ -9086,7 +9086,15 @@ let
|
|||
|
||||
drumkv1 = callPackage ../applications/audio/drumkv1 { };
|
||||
|
||||
dwarf_fortress = callPackage_i686 ../games/dwarf-fortress { };
|
||||
dwarf_fortress = callPackage_i686 ../games/dwarf-fortress {
|
||||
SDL_image = pkgsi686Linux.SDL_image.override {
|
||||
libpng = pkgsi686Linux.libpng12;
|
||||
};
|
||||
};
|
||||
|
||||
dwarf_fortress_modable = appendToName "moddable" (dwarf_fortress.override {
|
||||
copyDataDirectory = true;
|
||||
});
|
||||
|
||||
d1x_rebirth = callPackage ../games/d1x-rebirth { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue