20 assets_version = "2.2.5";
23 url = "https://github.com/mazmazz/SRB2/releases/download/SRB2_assets_220/srb2-${assets_version}-assets.7z";
24 sha256 = "1m9xf3vraq9nipsi09cyvvfa4i37gzfxg970rnqfswd86z9v6v00";
27 assets_optional = fetchurl {
28 url = "https://github.com/mazmazz/SRB2/releases/download/SRB2_assets_220/srb2-${assets_version}-optional-assets.7z";
29 sha256 = "1j29jrd0r1k2bb11wyyl6yv9b90s2i6jhrslnh77qkrhrwnwcdz4";
32 in stdenv.mkDerivation rec {
36 src = fetchFromGitHub {
39 rev = "SRB2_release_${version}";
40 sha256 = "03388n094d2yr5si6ngnggbqhm8b2l0s0qvfnkz49li9bd6a81gg";
60 "-DSRB2_ASSET_DIRECTORY=/build/source/assets"
61 "-DGME_INCLUDE_DIR=${game-music-emu}/include"
62 "-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
63 "-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
64 "-DSDL2_INCLUDE_DIR=${lib.getDev SDL2}/include/SDL2"
72 substituteInPlace src/sdl/i_system.c \
73 --replace '@wadlocation@' $out
77 7z x ${assets} -o"/build/source/assets" -aos
78 7z x ${assets_optional} -o"/build/source/assets" -aos
83 mv $out/lsdlsrb2-${version} $out/bin/srb2
87 description = "Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy";
88 homepage = "https://www.srb2.org/";
89 platforms = platforms.linux;
90 license = licenses.gpl2Plus;
91 maintainers = with maintainers; [ zeratax ];