1 { lib, stdenv, fetchFromGitHub, cmake, pkg-config, SDL2, SDL2_mixer, alsa-lib, libpng
2 , pcre, makeDesktopItem }:
4 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
13 sha256 = "sha256-5Ijy28LLx1TGnZE6ZNQXPYfvW2KprF+91fKx2MzLEms=";
16 nativeBuildInputs = [ cmake pkg-config ];
18 buildInputs = [ SDL2 SDL2_mixer alsa-lib libpng pcre ];
20 hardeningDisable = ["all"];
23 cmakeFlags = ["-DCMAKE_CXX_FLAGS=-DWIZARD"];
25 # Help CMake find SDL_mixer.h
26 env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2_mixer}/include/SDL2";
28 # Create "ivan.desktop" file
29 ivanDesktop = makeDesktopItem {
35 categories = [ "Game" "AdventureGame" "RolePlaying" ];
36 comment = meta.description;
39 # Create appropriate directories. Copy icons and desktop item to these directories.
41 mkdir -p $out/share/applications
42 mkdir -p $out/share/icons/hicolor/16x16/apps
43 mkdir -p $out/share/icons/hicolor/32x32/apps
44 mkdir -p $out/share/icons/hicolor/128x128/apps
45 mkdir -p $out/share/icons/hicolor/256x256/apps
46 mkdir -p $out/share/icons/hicolor/512x512/apps
47 cp $src/Graphics/icons/shadowless.iconset/icon_16x16.png $out/share/icons/hicolor/16x16/apps/ivan.png
48 cp $src/Graphics/icons/shadowless.iconset/icon_32x32.png $out/share/icons/hicolor/32x32/apps/ivan.png
49 cp $src/Graphics/icons/shadowless.iconset/icon_128x128.png $out/share/icons/hicolor/128x128/apps/ivan.png
50 cp $src/Graphics/icons/shadowless.iconset/icon_256x256.png $out/share/icons/hicolor/256x256/apps/ivan.png
51 cp $src/Graphics/icons/shadowless.iconset/icon_512x512.png $out/share/icons/hicolor/512x512/apps/ivan.png
52 cp ${ivanDesktop}/share/applications/* $out/share/applications
56 description = "Graphical roguelike game";
58 Iter Vehemens ad Necem (IVAN) is a graphical roguelike game, which currently
59 runs in Windows, DOS, Linux, and OS X. It features advanced bodypart and
60 material handling, multi-colored lighting and, above all, deep gameplay.
62 This is a fan continuation of IVAN by members of Attnam.com
64 homepage = "https://attnam.com/";
65 license = licenses.gpl2Plus;
66 platforms = platforms.linux;
67 maintainers = with maintainers; [];