574d33a2de
* //3p/farmhash: drop, as it is unused and started to fail * //3p/overlays/tvl: - patch barrier to work with gcc 11 - disable outdated test suite for python38Packages.backports-zoneinfo which still assumes zoneinfo 2020a. * //3p/overlays/haskell: patch generic-arbitrary to avoid neg resizes * //users/grfn/achilles: disable CI due to linking trouble (ugh). * //users/grfn/system/home/games: Disable DFHack for dwarf fortress as it's now failing to build Refs: ENG-328 Change-Id: I4e1ee8fd9525d4868b82f9bad8ca5f09e7fdb9d0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5506 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
61 lines
1.5 KiB
Nix
61 lines
1.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with pkgs;
|
|
with lib;
|
|
|
|
let
|
|
|
|
df-orig = dwarf-fortress-packages.dwarf-fortress-original;
|
|
|
|
df-full = (dwarf-fortress-packages.dwarf-fortress-full.override {
|
|
theme = null;
|
|
enableIntro = false;
|
|
enableFPS = true;
|
|
enableDFHack = false; # Fails to build currently
|
|
});
|
|
|
|
init = runCommand "init.txt" { } ''
|
|
substitute "${df-orig}/data/init/init.txt" $out \
|
|
--replace "[INTRO:YES]" "[INTRO:NO]" \
|
|
--replace "[VOLUME:255]" "[VOLUME:0]" \
|
|
--replace "[FPS:NO]" "[FPS:YES]"
|
|
'';
|
|
|
|
d_init = runCommand "d_init.txt" { } ''
|
|
substitute "${df-orig}/data/init/d_init.txt" $out \
|
|
--replace "[AUTOSAVE:NONE]" "[AUTOSAVE:SEASONAL]" \
|
|
--replace "[AUTOSAVE_PAUSE:NO]" "[AUTOSAVE_PAUSE:YES]" \
|
|
--replace "[INITIAL_SAVE:NO]" "[INITIAL_SAVE:YES]" \
|
|
--replace "[EMBARK_WARNING_ALWAYS:NO]" "[EMBARK_WARNING_ALWAYS:YES]" \
|
|
--replace "[VARIED_GROUND_TILES:YES]" "[VARIED_GROUND_TILES:NO]" \
|
|
--replace "[SHOW_FLOW_AMOUNTS:NO]" "[SHOW_FLOW_AMOUNTS:YES]"
|
|
'';
|
|
|
|
df = runCommand "dwarf-fortress" { } ''
|
|
mkdir -p $out/bin
|
|
sed \
|
|
-e '4icp -f ${init} "$DF_DIR/data/init/init.txt"' \
|
|
-e '4icp -f ${d_init} "$DF_DIR/data/init/d_init.txt"' \
|
|
< "${df-full}/bin/dwarf-fortress" >"$out/bin/dwarf-fortress"
|
|
|
|
shopt -s extglob
|
|
ln -s ${df-full}/bin/!(dwarf-fortress) $out/bin
|
|
|
|
chmod +x $out/bin/dwarf-fortress
|
|
'';
|
|
|
|
in
|
|
mkMerge [
|
|
{
|
|
home.packages = [
|
|
crawl
|
|
xonotic
|
|
];
|
|
}
|
|
(mkIf stdenv.isLinux {
|
|
home.packages = [
|
|
df
|
|
polymc
|
|
];
|
|
})
|
|
]
|