dwarf-fortress: fix build error

This commit is contained in:
lassulus 2018-10-08 22:21:09 +02:00
parent 21a215059e
commit 0d57159eca

View File

@ -1,4 +1,4 @@
{ stdenv, lib, buildEnv, substituteAll { stdenv, lib, buildEnv, substituteAll, runCommand
, dwarf-fortress, dwarf-fortress-unfuck , dwarf-fortress, dwarf-fortress-unfuck
, dwarf-therapist , dwarf-therapist
, enableDFHack ? false, dfhack , enableDFHack ? false, dfhack
@ -33,20 +33,11 @@ let
++ lib.optional enableTWBT twbt.art ++ lib.optional enableTWBT twbt.art
++ [ dwarf-fortress ]; ++ [ dwarf-fortress ];
env = buildEnv { fixup = lib.singleton (runCommand "fixup" {} ''
name = "dwarf-fortress-env-${dwarf-fortress.dfVersion}"; mkdir -p $out/data/init
cp ${dwarf-fortress}/data/init/init.txt $out/data/init/init.txt
paths = themePkg ++ pkgs;
pathsToLink = [ "/" "/hack" "/hack/scripts" ];
postBuild = ''
# De-symlink init.txt
cp $out/data/init/init.txt init.txt
rm -f $out/data/init/init.txt
mv init.txt $out/data/init/init.txt
'' + lib.optionalString enableDFHack '' '' + lib.optionalString enableDFHack ''
# De-symlink symbols.xml mkdir -p $out/hack
rm $out/hack/symbols.xml
# Patch the MD5 # Patch the MD5
orig_md5=$(cat "${dwarf-fortress}/hash.md5.orig") orig_md5=$(cat "${dwarf-fortress}/hash.md5.orig")
@ -69,7 +60,13 @@ let
--replace '[INTRO:YES]' '[INTRO:${unBool enableIntro}]' \ --replace '[INTRO:YES]' '[INTRO:${unBool enableIntro}]' \
--replace '[TRUETYPE:YES]' '[TRUETYPE:${unBool enableTruetype}]' \ --replace '[TRUETYPE:YES]' '[TRUETYPE:${unBool enableTruetype}]' \
--replace '[FPS:NO]' '[FPS:${unBool enableFPS}]' --replace '[FPS:NO]' '[FPS:${unBool enableFPS}]'
''; '');
env = buildEnv {
name = "dwarf-fortress-env-${dwarf-fortress.dfVersion}";
paths = fixup ++ themePkg ++ pkgs;
pathsToLink = [ "/" "/hack" "/hack/scripts" ];
ignoreCollisions = true; ignoreCollisions = true;
}; };