Unverified Commit 277a35d0 authored by Ben Siraphob's avatar Ben Siraphob Committed by GitHub
Browse files

itgmania: add new package scope for themes, update to 1.2.1 (#501591)

parents 0438c4c1 411c45ca
Loading
Loading
Loading
Loading
+13 −87
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  nasm,
  pkg-config,
  copyDesktopItems,
  alsa-lib,
  glew,
  glib,
  gtk3,
  libmad,
  libogg,
  libpulseaudio,
  libusb-compat-0_1,
  libvorbis,
  libxtst,
  udev,
  symlinkJoin,
  makeWrapper,
  makeDesktopItem,
  itgmaniaPackages,
  extraPackages ? [ ],
}:
let
  unwrapped = itgmaniaPackages.itgmania-unwrapped;
in
symlinkJoin {
  inherit (unwrapped) pname version meta;

stdenv.mkDerivation (finalAttrs: {
  pname = "itgmania";
  version = "1.2.0";
  paths = [ unwrapped ] ++ extraPackages;

  src = fetchFromGitHub {
    owner = "itgmania";
    repo = "itgmania";
    tag = "v${finalAttrs.version}";
    fetchSubmodules = true;
    hash = "sha256-RkV/OIDudt2XemhaFRY7IA5o7Q2w+j01tauD7KpzYpA=";
  };
  nativeBuildInputs = [ makeWrapper ];

  nativeBuildInputs = [
    cmake
    nasm
    pkg-config
    makeWrapper
    copyDesktopItems
  ];

  buildInputs = [
    alsa-lib
    glew
    glib
    gtk3
    libmad
    libogg
    libpulseaudio
    libusb-compat-0_1
    libvorbis
    libxtst
    udev
  ];

  cmakeFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "-DWITH_MINIMAID=off" ];

  postInstall = ''
  postBuild = ''
    makeWrapper $out/itgmania/itgmania $out/bin/itgmania \
      --chdir $out/itgmania

    mkdir -p $out/share/icons/hicolor/scalable/apps/
    ln -s $out/itgmania/Data/logo.svg $out/share/icons/hicolor/scalable/apps/itgmania.svg
  '';

  desktopItems = [
    (makeDesktopItem {
      name = "itgmania";
      desktopName = "ITGmania";
      genericName = "Rhythm and dance game";
      tryExec = "itgmania";
      exec = "itgmania";
      terminal = false;
      icon = "itgmania";
      type = "Application";
      comment = "A cross-platform rhythm video game.";
      categories = [
        "Game"
        "ArcadeGame"
      ];
    })
  ];

  meta = {
    homepage = "https://www.itgmania.com/";
    description = "Fork of StepMania 5.1, improved for the post-ITG community";
    platforms = lib.platforms.linux;
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      ftsimas
      maxwell-lt
    ];
    mainProgram = "itgmania";
  };
})
  passthru.unwrapped = unwrapped;
}
+10 −0
Original line number Diff line number Diff line
{ lib, newScope }:
lib.makeScope newScope (self: {
  itgmania-unwrapped = self.callPackage ./unwrapped.nix { };
  # Themes
  arrowcloud-theme = self.callPackage ./themes/arrowcloud-theme.nix { };
  digital-dance = self.callPackage ./themes/digital-dance.nix { };
  itg2-sm5 = self.callPackage ./themes/itg2-sm5.nix { };
  itg3encore = self.callPackage ./themes/itg3encore.nix { };
  zmod-simply-love = self.callPackage ./themes/zmod-simply-love.nix { };
})
+31 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "arrowcloud-theme";
  version = "20260328";

  src = fetchFromGitHub {
    owner = "Arrow-Cloud";
    repo = "theme";
    tag = "v${finalAttrs.version}";
    hash = "sha256-9BND3IUIc5uMBxzw+Pn/59jBKBK/xGWrOIgcIYIQvgk=";
  };

  postInstall = ''
    mkdir -p "$out/itgmania/Themes/Arrow Cloud"
    mv * "$out/itgmania/Themes/Arrow Cloud"
  '';

  passthru.updateScript = nix-update-script { extraArgs = [ "--use-github-releases" ]; };

  meta = {
    description = "Arrow Cloud's fork of Zmod";
    homepage = "https://github.com/Arrow-Cloud/theme";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ungeskriptet ];
  };
})
+31 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromCodeberg,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "digital-dance";
  version = "1.1.3-unstable-2026-04-19";

  src = fetchFromCodeberg {
    owner = "JNero";
    repo = "Digital-Dance-ITGMania";
    rev = "bfce7a6d719189a3eec1577b54256941e8d602a5";
    hash = "sha256-yrXdU73Jokm+nMMi8mtxdEL5+xuFj4sHIW+/nulcJJI=";
  };

  postInstall = ''
    mkdir -p "$out/itgmania/Themes/Digital Dance"
    mv * "$out/itgmania/Themes/Digital Dance"
  '';

  passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

  meta = {
    description = "Theme for ITGMania to (hopefully) utilize all of it's features and more";
    homepage = "https://codeberg.org/JNero/Digital-Dance-ITGMania";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ungeskriptet ];
  };
})
+31 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "itg2-sm5";
  version = "1.1.0-unstable-2025-10-08";

  src = fetchFromGitHub {
    owner = "JoseVarelaP";
    repo = "In-The-Groove2-SM5";
    rev = "e25f1a44efa55cd2247891f40633403910b75d21";
    hash = "sha256-FMyT7ZA/1cqiClXDvD7CmJlOFaaWnPLuOuei6fsbzg8=";
  };

  postInstall = ''
    mkdir -p "$out/itgmania/Themes/ITG2-SM5"
    mv * "$out/itgmania/Themes/ITG2-SM5"
  '';

  passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };

  meta = {
    description = "Semi-Conversion/Recreation of In The Groove 1 & 2 to StepMania 5";
    homepage = "https://github.com/JoseVarelaP/In-The-Groove2-SM5";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ ungeskriptet ];
  };
})
Loading