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.hostPlatform.isDarwin [ CoreFoundation ];
13 tilesDeps = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf freetype ]
14 ++ optionals stdenv.hostPlatform.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.hostPlatform.isDarwin [
56 "OSX_MIN=${stdenv.hostPlatform.darwinMinVersion}"
59 postInstall = optionalString tiles
60 ( if !stdenv.hostPlatform.isDarwin
62 else installMacOSAppLauncher
66 enableParallelBuilding = true;
74 description = "Free, post apocalyptic, zombie infested rogue-like";
75 mainProgram = "cataclysm-tiles";
77 Cataclysm: Dark Days Ahead is a roguelike set in a post-apocalyptic world.
78 Surviving is difficult: you have been thrown, ill-equipped, into a
79 landscape now riddled with monstrosities of which flesh eating zombies are
80 neither the strangest nor the deadliest.
82 Yet with care and a little luck, many things are possible. You may try to
83 eke out an existence in the forests silently executing threats and
84 providing sustenance with your longbow. You can ride into town in a
85 jerry-rigged vehicle, all guns blazing, to settle matters in a fug of
86 smoke from your molotovs. You could take a more measured approach and
87 construct an impregnable fortress, surrounded by traps to protect you from
88 the horrors without. The longer you survive, the more skilled and adapted
89 you will get and the better equipped and armed to deal with the threats
90 you are presented with.
92 In the course of your ordeal there will be opportunities and temptations
93 to improve or change your very nature. There are tales of survivors fitted
94 with extraordinary cybernetics giving great power and stories too of
95 gravely mutated survivors who, warped by their ingestion of exotic
96 substances or radiation, now more closely resemble insects, birds or fish
97 than their original form.
99 homepage = "https://cataclysmdda.org/";
100 license = licenses.cc-by-sa-30;
101 maintainers = with maintainers; [ mnacamura DeeUnderscore ];
102 platforms = platforms.unix;