How to install cataclysm-dda with soundpack?

cdda nix package is explained here https://github.com/NixOS/nixpkgs/blob/2b36da76cf33b504d9c4ffe5c7dfe537077276af/doc/builders/packages/cataclysm-dda.section.md however I fail every attempt installing either soundpack mod or cataclysm-dda-git. Is there any good examples how to install it into my configuration.nix?

I tried making overlay

Overlay code snippet
let
    inherit (cataclysmDDA) attachPkgs pkgs wrapCDDA;
    customMods = self: super: lib.recursiveUpdate super {
      
      soundpack.Fantastic = cataclysmDDA.buildSoundPack {
          modName = "CDDA-Soundpacks";
          version = "2023-03-18";
          src = fetchurl {
            name = "CC-Sounds.zip ";
            url = "https://github.com/Fris0uman/CDDA-Soundpacks/releases/download/2023-03-18/CC-Sounds.zip";
            sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
          };
          nativeBuildInputs = [ unzip ];
      };
    };

in {

  cdda = final: prev: {
      cdda-modded = cataclysm-dda.withMods (mods: with mods.extend customMods; [
        soundpack.Fantastic
      ]);
  };
  
} 

but then cataclysmDDA is missing and no idea where its coming from
Also if just downloading from github releases game already includes this soundpack while our nix package doesnt.

Another issue trying to install cataclysm-dda-git

cataclysm-dda-git.override
 (cataclysm-dda-git.override {
      version = "2023-07-07";
      rev = "e62f537ef6a74759bd2ee39940557a362f8e1e96";
      sha256 = "sha256-Q07s8Ndlf7Dfms7a80OBUK2kkCFIUHcNbEvE8ZgVNYI=";
    })
Fails at patching translations.cpp
unpacking sources
unpacking source archive /nix/store/bkbyaqa1n9krsf91nk3jlnyl5f12zn5x-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
applying patch /nix/store/q9x4iq94gjvy4vbl0xzvffi4618wpfbq-locale-path.patch
patching file src/translations.cpp
Hunk #1 FAILED at 61.
1 out of 1 hunk FAILED -- saving rejects to file src/translations.cpp.rej

Its such a great open source game but so difficult to approach it in nixos

1 Like

I realize that it’s a long time since you asked this question and you might have fixed it yourself already, but for what it’s worth I had to solve the same problem, and your post was helpful in getting there so thank you for that. Here’s how I got the overlay working: GitHub - starlightsys/CDDA-modding: Example Nix overlay that patches and adds mods to Cataclysm: Dark Days Ahead