diff options
author | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2020-07-08 11:26:23 +0900 |
---|---|---|
committer | Mitsuhiro Nakamura <m.nacamura@gmail.com> | 2020-07-18 14:23:25 +0900 |
commit | f2b2347b2950e78e45216b05034cf074f75c4108 (patch) | |
tree | a5209bb8a4aa4ce3f7c33f1b531b0c32b815bab2 /doc/builders | |
parent | c9c6f5f6937b8703092363488bb6fa6c59c255f8 (diff) |
doc: add section for cataclysm-dda
Diffstat (limited to 'doc/builders')
-rw-r--r-- | doc/builders/packages/cataclysm-dda.section.md | 94 | ||||
-rw-r--r-- | doc/builders/packages/index.xml | 1 |
2 files changed, 95 insertions, 0 deletions
diff --git a/doc/builders/packages/cataclysm-dda.section.md b/doc/builders/packages/cataclysm-dda.section.md new file mode 100644 index 000000000000..ae2ee56a010e --- /dev/null +++ b/doc/builders/packages/cataclysm-dda.section.md @@ -0,0 +1,94 @@ +# Cataclysm: Dark Days Ahead + +## How to install Cataclysm DDA + +To install the latest stable release of Cataclysm DDA to your profile, execute +`nix-env -f "<nixpkgs>" -iA cataclysm-dda`. For the curses build (build +without tiles), install `cataclysmDDA.stable.curses`. Note: `cataclysm-dda` is +an alias to `cataclysmDDA.stable.tiles`. + +If you like access to a development build of your favorite git revision, +override `cataclysm-dda-git` (or `cataclysmDDA.git.curses` if you like curses +build): + +```nix +cataclysm-dda-git.override { + version = "YYYY-MM-DD"; + rev = "YOUR_FAVORITE_REVISION"; + sha256 = "CHECKSUM_OF_THE_REVISION"; +} +``` + +The sha256 checksum can be obtained by + +```sh +nix-prefetch-url --unpack "https://github.com/CleverRaven/Cataclysm-DDA/archive/${YOUR_FAVORITE_REVISION}.tar.gz" +``` + +The default configuration directory is `~/.cataclysm-dda`. If you prefer +`$XDG_CONFIG_HOME/cataclysm-dda`, override the derivation: + +```nix +cataclysm-dda.override { + useXdgDir = true; +} +``` + +## Customizing with mods + +To install Cataclysm DDA with mods of your choice, you can use `withMods` +attribute: + +```nix +cataclysm-dda.withMods (mods: with mods; [ + tileset.UndeadPeople +]) +``` + +All mods, soundpacks, and tilesets available in nixpkgs are found in +`cataclysmDDA.pkgs`. + +Here is an example to modify existing mods and/or add more mods not available +in nixpkgs: + +```nix +let + customMods = self: super: lib.recursiveUpdate super { + # Modify existing mod + tileset.UndeadPeople = super.tileset.UndeadPeople.overrideAttrs (old: { + # If you like to apply a patch to the tileset for example + patches = [ ./path/to/your.patch ]; + }); + + # Add another mod + mod.Awesome = cataclysmDDA.buildMod { + modName = "Awesome"; + version = "0.x"; + src = fetchFromGitHub { + owner = "Someone"; + repo = "AwesomeMod"; + rev = "..."; + sha256 = "..."; + }; + # Path to be installed in the unpacked source (default: ".") + modRoot = "contents/under/this/path/will/be/installed"; + }; + + # Add another soundpack + soundpack.Fantastic = cataclysmDDA.buildSoundPack { + # ditto + }; + + # Add another tileset + tileset.SuperDuper = cataclysmDDA.buildTileSet { + # ditto + }; + }; +in +cataclysm-dda.withMods (mods: with mods.extend customMods; [ + tileset.UndeadPeople + mod.Awesome + soundpack.Fantastic + tileset.SuperDuper +]) +``` diff --git a/doc/builders/packages/index.xml b/doc/builders/packages/index.xml index 4e109bd1c599..e20b0c689a80 100644 --- a/doc/builders/packages/index.xml +++ b/doc/builders/packages/index.xml @@ -18,6 +18,7 @@ <xi:include href="opengl.xml" /> <xi:include href="shell-helpers.xml" /> <xi:include href="steam.xml" /> + <xi:include href="cataclysm-dda.section.xml" /> <xi:include href="urxvt.xml" /> <xi:include href="weechat.xml" /> <xi:include href="xorg.xml" /> |