21 stdenv.mkDerivation (finalAttrs: {
25 src = fetchFromGitHub {
28 rev = "SRB2_release_${finalAttrs.version}";
29 hash = "sha256-OSkkjCz7ZW5+0vh6l7+TpnHLzXmd/5QvTidRQSHJYX8=";
50 assets = stdenv.mkDerivation {
52 version = finalAttrs.version;
59 url = "https://github.com/STJr/SRB2/releases/download/SRB2_release_${finalAttrs.version}/SRB2-v${lib.replaceStrings ["."] [""] finalAttrs.version}-Full.zip";
60 hash = "sha256-g7kaNRE1tjcF5J2v+kTnrDzz4zs5f1b/NH67ce2ifUo=";
66 mkdir -p $out/share/srb2
67 cp -r *pk3 *dta *dat models/ $out/share/srb2/
72 "-DSRB2_ASSET_DIRECTORY=${finalAttrs.assets}/share/srb2"
73 "-DGME_INCLUDE_DIR=${game-music-emu}/include"
74 "-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
75 "-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
76 "-DSDL2_INCLUDE_DIR=${lib.getDev SDL2.dev}/include/SDL2"
80 # Make the build work without internet connectivity
81 # See: https://build.opensuse.org/request/show/1109889
87 (makeDesktopItem rec {
88 name = "Sonic Robo Blast 2";
89 exec = finalAttrs.pname;
90 icon = finalAttrs.pname;
91 comment = finalAttrs.meta.description;
94 categories = [ "Game" ];
99 mkdir -p $out/bin $out/share/applications $out/share/pixmaps $out/share/icons
103 cp ../srb2.png $out/share/pixmaps/.
104 cp ../srb2.png $out/share/icons/.
106 cp bin/lsdlsrb2 $out/bin/srb2
107 wrapProgram $out/bin/srb2 --set SRB2WADDIR "${finalAttrs.assets}/share/srb2"
111 description = "Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy";
112 homepage = "https://www.srb2.org/";
113 platforms = platforms.linux;
114 license = licenses.gpl2Plus;
115 maintainers = with maintainers; [ zeratax donovanglover ];
116 mainProgram = "srb2";