1 { lib, stdenv, runtimeShell, pkg-config, gettext, ncurses, CoreFoundation
2 , tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa
8 inherit (lib) optionals optionalString;
10 cursesDeps = [ gettext ncurses ]
11 ++ optionals stdenv.isDarwin [ CoreFoundation ];
13 tilesDeps = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf freetype ]
14 ++ optionals stdenv.isDarwin [ Cocoa ];
17 substituteInPlace $out/share/applications/org.cataclysmdda.CataclysmDDA.desktop \
18 --replace "Exec=cataclysm-tiles" "Exec=$out/bin/cataclysm-tiles"
21 installMacOSAppLauncher = ''
22 app=$out/Applications/Cataclysm.app
23 install -D -m 444 build-data/osx/Info.plist -t $app/Contents
24 install -D -m 444 build-data/osx/AppIcon.icns -t $app/Contents/Resources
25 mkdir $app/Contents/MacOS
26 launcher=$app/Contents/MacOS/Cataclysm.sh
27 cat << EOF > $launcher
29 $out/bin/cataclysm-tiles
36 pname = "cataclysm-dda";
38 nativeBuildInputs = [ pkg-config ];
40 buildInputs = cursesDeps ++ optionals tiles tilesDeps;
43 patchShebangs lang/compile_mo.sh
47 "PREFIX=$(out)" "LANGUAGES=all"
48 (if useXdgDir then "USE_XDG_DIR=1" else "USE_HOME_DIR=1")
49 ] ++ optionals (!debug) [
51 ] ++ optionals tiles [
53 ] ++ optionals stdenv.isDarwin [
56 "OSX_MIN=${stdenv.hostPlatform.darwinMinVersion}"
59 postInstall = optionalString tiles
62 else installMacOSAppLauncher
66 enableParallelBuilding = true;
74 description = "A free, post apocalyptic, zombie infested rogue-like";
76 Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
77 Surviving is difficult: you have been thrown, ill-equipped, into a
78 landscape now riddled with monstrosities of which flesh eating zombies are
79 neither the strangest nor the deadliest.
81 Yet with care and a little luck, many things are possible. You may try to
82 eke out an existence in the forests silently executing threats and
83 providing sustenance with your longbow. You can ride into town in a
84 jerry-rigged vehicle, all guns blazing, to settle matters in a fug of
85 smoke from your molotovs. You could take a more measured approach and
86 construct an impregnable fortress, surrounded by traps to protect you from
87 the horrors without. The longer you survive, the more skilled and adapted
88 you will get and the better equipped and armed to deal with the threats
89 you are presented with.
91 In the course of your ordeal there will be opportunities and temptations
92 to improve or change your very nature. There are tales of survivors fitted
93 with extraordinary cybernetics giving great power and stories too of
94 gravely mutated survivors who, warped by their ingestion of exotic
95 substances or radiation, now more closely resemble insects, birds or fish
96 than their original form.
98 homepage = "https://cataclysmdda.org/";
99 license = licenses.cc-by-sa-30;
100 maintainers = with maintainers; [ mnacamura DeeUnderscore ];
101 platforms = platforms.unix;