1 # Cataclysm: Dark Days Ahead {#cataclysm-dark-days-ahead}
3 ## How to install Cataclysm DDA {#how-to-install-cataclysm-dda}
5 To install the latest stable release of Cataclysm DDA to your profile, execute
6 `nix-env -f "<nixpkgs>" -iA cataclysm-dda`. For the curses build (build
7 without tiles), install `cataclysmDDA.stable.curses`. Note: `cataclysm-dda` is
8 an alias to `cataclysmDDA.stable.tiles`.
10 If you like access to a development build of your favorite git revision,
11 override `cataclysm-dda-git` (or `cataclysmDDA.git.curses` if you like curses
15 cataclysm-dda-git.override {
16 version = "YYYY-MM-DD";
17 rev = "YOUR_FAVORITE_REVISION";
18 sha256 = "CHECKSUM_OF_THE_REVISION";
22 The sha256 checksum can be obtained by
25 nix-prefetch-url --unpack "https://github.com/CleverRaven/Cataclysm-DDA/archive/${YOUR_FAVORITE_REVISION}.tar.gz"
28 The default configuration directory is `~/.cataclysm-dda`. If you prefer
29 `$XDG_CONFIG_HOME/cataclysm-dda`, override the derivation:
32 cataclysm-dda.override {
37 ## Important note for overriding packages {#important-note-for-overriding-packages}
39 After applying `overrideAttrs`, you need to fix `passthru.pkgs` and
40 `passthru.withMods` attributes either manually or by using `attachPkgs`:
44 # You enabled parallel building.
45 myCDDA = cataclysm-dda-git.overrideAttrs (_: {
46 enableParallelBuilding = true;
49 # Unfortunately, this refers to the package before overriding and
50 # parallel building is still disabled.
51 badExample = myCDDA.withMods (_: []);
53 inherit (cataclysmDDA) attachPkgs pkgs wrapCDDA;
55 # You can fix it by hand
56 goodExample1 = myCDDA.overrideAttrs (old: {
57 passthru = old.passthru // {
58 pkgs = pkgs.override { build = goodExample1; };
59 withMods = wrapCDDA goodExample1;
63 # or by using a helper function `attachPkgs`.
64 goodExample2 = attachPkgs pkgs myCDDA;
67 # badExample # parallel building disabled
68 # goodExample1.withMods (_: []) # parallel building enabled
69 goodExample2.withMods (_: []) # parallel building enabled
72 ## Customizing with mods {#customizing-with-mods}
74 To install Cataclysm DDA with mods of your choice, you can use `withMods`
78 cataclysm-dda.withMods (mods: with mods; [
83 All mods, soundpacks, and tilesets available in nixpkgs are found in
86 Here is an example to modify existing mods and/or add more mods not available
91 customMods = self: super: lib.recursiveUpdate super {
93 tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: {
94 # If you like to apply a patch to the tileset for example
95 patches = [ ./path/to/your.patch ];
99 mod.Awesome = cataclysmDDA.buildMod {
102 src = fetchFromGitHub {
108 # Path to be installed in the unpacked source (default: ".")
109 modRoot = "contents/under/this/path/will/be/installed";
112 # Add another soundpack
113 soundpack.Fantastic = cataclysmDDA.buildSoundPack {
117 # Add another tileset
118 tileset.SuperDuper = cataclysmDDA.buildTileSet {
123 cataclysm-dda.withMods (mods: with mods.extend customMods; [