NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.27k stars 14.26k forks source link

odamex: missing desktop files #330272

Open 0n-s opened 3 months ago

0n-s commented 3 months ago

Describe the bug

The odamex derivation lacks desktop files.

Steps To Reproduce

Steps to reproduce the behavior:

  1. ?

Expected behavior

The derivation should have desktop files.

Additional context

The upstream repository has these in its package for Arch Linux, but they are generic (the /usr/share/doom path might need tweaking, though). Preferably use these over homemade ones, as these have the upstream seal of approval.

Notify maintainers

(unmaintained, if I am interpreting correctly)

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.10.0, NixOS, 24.11 (Vicuna), 24.11pre657537.5ad6a14c6bf0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

keenanweaver commented 3 months ago

The version offered in nixpkgs is also ancient, so it probably needs an all-around do-over.

qwqawawow commented 3 months ago

Some packages are static linked. I don't know about sdl

(import <nixpkgs> { }).callPackage (
  {
    lib,
    stdenv,
    fetchFromGitHub,
    cmake,
    pcre2,

    jsoncpp,
    portmidi,
    zlib,
    curl,
    libpng,
    pkg-config,
    makeWrapper,
    SDL2,
    SDL2_mixer,
    SDL2_net,
    wxGTK32,
    miniupnpc,
    enableUPnP ? true,
    enablePortmini ? true,
    makeDesktopItem,
    copyDesktopItems,

  }:

  stdenv.mkDerivation rec {
    pname = "odamex";
    version = "10.5.0";

    src = fetchFromGitHub {
      owner = "odamex";
      repo = "odamex";
      rev = version;
      hash = "sha256-zwRzirrtwyZdSF/zrLfF4/KnGxyYpmE7bYgiOwVT+DM=";
      fetchSubmodules = true;
    };

    nativeBuildInputs = [
      pkg-config
      makeWrapper
      cmake
      copyDesktopItems
    ];
    buildInputs = [
      SDL2
      SDL2_mixer
      SDL2_net
      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;
    };
  }
) { }
souxd commented 3 months ago

relevant info from the gentoo package:

odalaunch crashes with 3.2. Check it before updating!

https://github.com/odamex/odamex/issues/879

WX_GTK_VER="3.0-gtk3" 3.0 was removed from the bin cache so it might be a good idea to disable the odalaunch compilation by default

souxd commented 1 week ago

relevant info from the gentoo package:

odalaunch crashes with 3.2. Check it before updating!

odamex/odamex#879

WX_GTK_VER="3.0-gtk3" 3.0 was removed from the bin cache so it might be a good idea to disable the odalaunch compilation by default

fixed upsteam: https://github.com/odamex/odamex/pull/1075