Unverified Commit 1fe6dbd0 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

q2pro: drop (#473655)

parents ded894b1 cb717c6a
Loading
Loading
Loading
Loading

pkgs/by-name/q2/q2pro/package.nix

deleted100644 → 0
+0 −143
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  meson,
  pkg-config,
  ninja,
  zlib,
  libpng,
  libjpeg,
  curl,
  SDL2,
  openalSoft,
  libGL,
  libogg,
  libvorbis,
  libX11,
  libXi,
  wayland,
  wayland-protocols,
  libdecor,
  ffmpeg,
  wayland-scanner,
  makeBinaryWrapper,
  versionCheckHook,
  copyDesktopItems,
  makeDesktopItem,
  desktopToDarwinBundle,
  x11Support ? stdenv.hostPlatform.isLinux,
  waylandSupport ? stdenv.hostPlatform.isLinux,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "q2pro";
  version = "0-unstable-2025-07-21";

  src = fetchFromGitHub {
    owner = "skullernet";
    repo = "q2pro";
    rev = "3aa0d40ba58935154b0d2a02116021bfbb4f17e8";
    hash = "sha256-aqpOoECNKozbCWnCFpyTCbUlTx8tdpqjMAES7x9yEM0=";
  };

  # build date and rev number is displayed in the game's console
  revCount = "3832"; # git rev-list --count ${src.rev}
  SOURCE_DATE_EPOCH = "1753090158"; # git show -s --format=%ct ${src.rev}

  nativeBuildInputs = [
    meson
    pkg-config
    ninja
    makeBinaryWrapper
    copyDesktopItems
  ]
  ++ lib.optional waylandSupport wayland-scanner
  ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;

  buildInputs = [
    zlib
    libpng
    libjpeg
    curl
    SDL2
    libGL
    libogg
    libvorbis
    libX11
    ffmpeg
    openalSoft
  ]
  ++ lib.optionals waylandSupport [
    wayland
    wayland-protocols
    libdecor
  ]
  ++ lib.optional x11Support libXi;

  mesonBuildType = "release";

  mesonFlags = [
    (lib.mesonBool "anticheat-server" true)
    (lib.mesonBool "client-gtv" true)
    (lib.mesonBool "packetdup-hack" true)
    (lib.mesonBool "variable-fps" true)
    (lib.mesonEnable "wayland" waylandSupport)
    (lib.mesonEnable "x11" x11Support)
    (lib.mesonEnable "icmp-errors" stdenv.hostPlatform.isLinux)
    (lib.mesonEnable "windows-crash-dumps" false)
  ];

  internalVersion = "r${finalAttrs.revCount}~${builtins.substring 0 8 finalAttrs.src.rev}";
  postPatch = ''
    echo '${finalAttrs.internalVersion}' > VERSION
  '';

  postInstall =
    let
      ldLibraryPathEnvName =
        if stdenv.hostPlatform.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
    in
    ''
      mv -v $out/bin/q2pro $out/bin/q2pro-unwrapped
      makeWrapper $out/bin/q2pro-unwrapped $out/bin/q2pro \
        --prefix ${ldLibraryPathEnvName} : "${lib.makeLibraryPath finalAttrs.buildInputs}"

      install -D ${finalAttrs.src}/src/unix/res/q2pro.xpm $out/share/icons/hicolor/32x32/apps/q2pro.xpm
    '';

  nativeInstallCheckInputs = [ versionCheckHook ];
  preVersionCheck = ''
    export version='${finalAttrs.internalVersion}'
  '';
  doInstallCheck = true;

  desktopItems = [
    (makeDesktopItem {
      name = "q2pro";
      desktopName = "Q2PRO";
      exec = if stdenv.hostPlatform.isDarwin then "q2pro" else "q2pro +connect %u";
      icon = "q2pro";
      terminal = false;
      mimeTypes = [
        "x-scheme-handler/quake2"
      ];
      type = "Application";
      categories = [
        "Game"
        "ActionGame"
      ];
    })
  ];

  passthru.updateScript = ./update.sh;

  meta = {
    description = "Enhanced Quake 2 client and server focused on multiplayer";
    homepage = "https://github.com/skullernet/q2pro";
    license = lib.licenses.gpl2;
    maintainers = with lib.maintainers; [ carlossless ];
    platforms = lib.platforms.unix;
    mainProgram = "q2pro";
  };
})

pkgs/by-name/q2/q2pro/update.sh

deleted100755 → 0
+0 −23
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p git common-updater-scripts
set -euo pipefail

attr="q2pro"

tmpdir=$(mktemp -d "/tmp/$attr.XXX")
repo="$tmpdir/repo"
trap 'rm -rf $tmpdir' EXIT

git clone https://github.com/skullernet/q2pro.git "$repo"

rev="$(git -C "$repo" rev-parse HEAD)"
revCount="$(git -C "$repo" rev-list --count HEAD)"
sourceDate="$(git -C "$repo" show -s --format=%cd --date=format:'%Y-%m-%d' HEAD)"
sourceDateEpoch="$(git -C "$repo" show -s --format=%ct HEAD)"
version="0-unstable-$sourceDate"

echo "Updating q2pro to version $version (rev: $rev, date: $sourceDateEpoch)"

update-source-version "$attr" "$version" --rev="${rev}"
update-source-version "$attr" "$revCount" --ignore-same-hash --version-key=revCount
update-source-version "$attr" "$sourceDateEpoch" --ignore-same-hash --version-key=SOURCE_DATE_EPOCH
+1 −0
Original line number Diff line number Diff line
@@ -1417,6 +1417,7 @@ mapAliases {
  python = throw "`python` previously pointed to Python 2; use `python3` or `python2` if necessary"; # Converted to throw 2025-10-27
  pythonFull = throw "'pythonFull' previously pointed to Python 2; use `python3` or `python2Full` if necessary"; # Converted to throw 2025-10-27
  pythonPackages = throw "`pythonPackages` previously pointed to Python 2; use `python3Packages` or `python2.pkgs` if necessary"; # Converted to throw 2025-10-27
  q2pro = throw "'q2pro' has been removed as upstream repository was deleted and no direct active forks were available."; # Added 2025-12-27
  qcachegrind = throw "'qcachegrind' has been removed, as it depends on KDE Gear 5, which has reached EOL"; # Added 2025-08-20
  qes = throw "'qes' has been removed, as it has been merged into shkd"; # Added 2025-12-21
  qflipper = throw "'qflipper' has been renamed to/replaced by 'qFlipper'"; # Converted to throw 2025-10-27