Merge pull request #48074 from Lassulus/dwarf-fortress

dwarf-fortress: fix build error
This commit is contained in:
Joachim F 2018-10-13 15:24:27 +00:00 committed by GitHub
commit 0c7103b131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 31 additions and 34 deletions

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;
}; };