diff --git a/pkgs/by-name/od/odamex/package.nix b/pkgs/by-name/od/odamex/package.nix new file mode 100644 index 0000000000000..456e566d1ef22 --- /dev/null +++ b/pkgs/by-name/od/odamex/package.nix @@ -0,0 +1,115 @@ + { + lib, + stdenv, + fetchFromGitHub, + cmake, + pcre2, + + jsoncpp, + portmidi, + zlib, + curl, + deutex, + libpng, + pkg-config, + makeWrapper, + SDL2, + SDL2_mixer, + wxGTK32, + miniupnpc, + enableUPnP ? true, + enablePortmini ? true, + makeDesktopItem, + copyDesktopItems, + + }: + + stdenv.mkDerivation rec { + pname = "odamex"; + version = "11.0.0"; + + src = fetchFromGitHub { + owner = "odamex"; + repo = "odamex"; + rev = version; + hash = "sha256-vJyrz5qZKQRQW4F7gZ9Fs5tYnxfBfw33kCHZNnqKZT8="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + pkg-config + makeWrapper + cmake + copyDesktopItems + ]; + + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + ]; + + buildInputs = [ + deutex + SDL2 + SDL2_mixer + wxGTK32 + zlib + curl + pcre2 + jsoncpp + + libpng + ] ++ lib.optionals enableUPnP [ miniupnpc ] ++ lib.optionals enablePortmini [ portmidi ]; + + desktopItems = [ + (makeDesktopItem { + name = "odalaunch"; + desktopName = "Odalaunch"; + exec = "odalaunch"; + icon = "odalaunch"; + type = "Application"; + comment = "Server Browser for Odamex"; + categories = [ + "Game" + "ActionGame" + ]; + }) + + (makeDesktopItem { + name = "odamex"; + desktopName = "Odamex"; + exec = "odamex -waddir /usr/share/doom"; # TODO replace in after phase + icon = "odamex"; + type = "Application"; + comment = "A Doom multiplayer game engine"; + categories = [ + "Game" + "ActionGame" + ]; + }) + + (makeDesktopItem { + desktopName = "Odamex server"; + name = "odasrv"; + exec = "odasrv"; + icon = "odasrv"; + type = "Application"; + terminal = true; + comment = "Run an Odamex game server"; + categories = [ + "Network" + + ]; + }) + + ]; + + meta = { + description = "Odamex - Online Multiplayer Doom port with a strong focus on the original gameplay while providing a breadth of enhancements"; + homepage = "https://github.com/odamex/odamex"; + changelog = "https://github.com/odamex/odamex/blob/${version}/CHANGELOG"; + license = lib.licenses.gpl2Only; + maintainers = with lib.maintainers; [ ]; + mainProgram = "odamex"; + platforms = lib.platforms.all; + }; + } diff --git a/pkgs/games/doom-ports/odamex/default.nix b/pkgs/games/doom-ports/odamex/default.nix deleted file mode 100644 index fb3b9a2fda4f0..0000000000000 --- a/pkgs/games/doom-ports/odamex/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ lib -, stdenv -, fetchurl -, cmake -, pkg-config -, makeWrapper -, SDL -, SDL_mixer -, SDL_net -, wxGTK32 -}: - -stdenv.mkDerivation rec { - pname = "odamex"; - version = "0.9.5"; - - src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-src-${version}.tar.bz2"; - sha256 = "sha256-WBqO5fWzemw1kYlY192v0nnZkbIEVuWmjWYMy+1ODPQ="; - }; - - nativeBuildInputs = [ - cmake - pkg-config - makeWrapper - ]; - - buildInputs = [ - SDL - SDL_mixer - SDL_net - wxGTK32 - ]; - - installPhase = '' - runHook preInstall - '' + (if stdenv.isDarwin then '' - mkdir -p $out/{Applications,bin} - mv odalaunch/odalaunch.app $out/Applications - makeWrapper $out/{Applications/odalaunch.app/Contents/MacOS,bin}/odalaunch - '' else '' - make install - '') + '' - runHook postInstall - ''; - - meta = { - homepage = "http://odamex.net/"; - description = "Client/server port for playing old-school Doom online"; - license = lib.licenses.gpl2Only; - platforms = lib.platforms.unix; - maintainers = [ ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5b57eaa779bd0..a7f45d7a9d93d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35473,8 +35473,6 @@ with pkgs; gzdoom = callPackage ../games/doom-ports/gzdoom { }; - odamex = callPackage ../games/doom-ports/odamex { }; - prboom-plus = callPackage ../games/doom-ports/prboom-plus { }; rbdoom-3-bfg = callPackage ../games/doom-ports/rbdoom-3-bfg { };