Skip to content

Commit 17b23f4

Browse files
committed
itgmaniaPackages: init
Add a new package scope for ITGmania. Themes and other extensions can be added here to allow configuring ITGmania declaratively using the extraPackages argument. Signed-off-by: David Wronek <david.wronek@mainlining.org>
1 parent 9db4a5b commit 17b23f4

File tree

9 files changed

+284
-90
lines changed

9 files changed

+284
-90
lines changed
Lines changed: 14 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,25 @@
11
{
2-
lib,
3-
stdenv,
4-
fetchFromGitHub,
5-
cmake,
6-
nasm,
7-
pkg-config,
8-
copyDesktopItems,
9-
alsa-lib,
10-
glew,
11-
glib,
12-
gtk3,
13-
libmad,
14-
libogg,
15-
libpulseaudio,
16-
libusb-compat-0_1,
17-
libvorbis,
18-
libxtst,
19-
udev,
2+
symlinkJoin,
203
makeWrapper,
21-
makeDesktopItem,
22-
nix-update-script,
4+
itgmaniaPackages,
5+
extraPackages ? [ ],
236
}:
7+
let
8+
unwrapped = itgmaniaPackages.itgmania-unwrapped;
9+
in
10+
symlinkJoin {
11+
inherit (unwrapped) pname version meta;
2412

25-
stdenv.mkDerivation (finalAttrs: {
26-
pname = "itgmania";
27-
version = "1.2.0";
13+
paths = [ unwrapped ] ++ extraPackages;
2814

29-
src = fetchFromGitHub {
30-
owner = "itgmania";
31-
repo = "itgmania";
32-
tag = "v${finalAttrs.version}";
33-
fetchSubmodules = true;
34-
hash = "sha256-RkV/OIDudt2XemhaFRY7IA5o7Q2w+j01tauD7KpzYpA=";
35-
};
15+
nativeBuildInputs = [ makeWrapper ];
3616

37-
nativeBuildInputs = [
38-
cmake
39-
nasm
40-
pkg-config
41-
makeWrapper
42-
copyDesktopItems
43-
];
17+
postBuild = ''
18+
rm $out/bin/itgmania
4419
45-
buildInputs = [
46-
alsa-lib
47-
glew
48-
glib
49-
gtk3
50-
libmad
51-
libogg
52-
libpulseaudio
53-
libusb-compat-0_1
54-
libvorbis
55-
libxtst
56-
udev
57-
];
58-
59-
cmakeFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "-DWITH_MINIMAID=off" ];
60-
61-
postInstall = ''
6220
makeWrapper $out/itgmania/itgmania $out/bin/itgmania \
6321
--chdir $out/itgmania
64-
65-
mkdir -p $out/share/icons/hicolor/scalable/apps/
66-
ln -s $out/itgmania/Data/logo.svg $out/share/icons/hicolor/scalable/apps/itgmania.svg
6722
'';
6823

69-
desktopItems = [
70-
(makeDesktopItem {
71-
name = "itgmania";
72-
desktopName = "ITGmania";
73-
genericName = "Rhythm and dance game";
74-
tryExec = "itgmania";
75-
exec = "itgmania";
76-
terminal = false;
77-
icon = "itgmania";
78-
type = "Application";
79-
comment = "A cross-platform rhythm video game.";
80-
categories = [
81-
"Game"
82-
"ArcadeGame"
83-
];
84-
})
85-
];
86-
87-
passthru.updateScript = nix-update-script { };
88-
89-
meta = {
90-
homepage = "https://www.itgmania.com/";
91-
description = "Fork of StepMania 5.1, improved for the post-ITG community";
92-
platforms = lib.platforms.linux;
93-
license = lib.licenses.mit;
94-
maintainers = with lib.maintainers; [
95-
ftsimas
96-
maxwell-lt
97-
ungeskriptet
98-
];
99-
mainProgram = "itgmania";
100-
};
101-
})
24+
passthru.unwrapped = unwrapped;
25+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{ lib, newScope }:
2+
lib.makeScope newScope (self: {
3+
itgmania-unwrapped = self.callPackage ./unwrapped.nix { };
4+
# Themes
5+
arrowcloud-theme = self.callPackage ./themes/arrowcloud-theme.nix { };
6+
digital-dance = self.callPackage ./themes/digital-dance.nix { };
7+
itg2-sm5 = self.callPackage ./themes/itg2-sm5.nix { };
8+
itg3encore = self.callPackage ./themes/itg3encore.nix { };
9+
zmod-simply-love = self.callPackage ./themes/zmod-simply-love.nix { };
10+
})
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
}:
7+
stdenv.mkDerivation (finalAttrs: {
8+
pname = "arrowcloud-theme";
9+
version = "20260225-unstable-2026-02-25";
10+
11+
src = fetchFromGitHub {
12+
owner = "Arrow-Cloud";
13+
repo = "theme";
14+
rev = "bb666e9c451fd0a9cfd5cf8b8a58af2db1fad8a5";
15+
hash = "sha256-JhldvfTa3PrDrnLdQGB4JEf8d9JM7rcQpXy6WYBRdeU=";
16+
};
17+
18+
postInstall = ''
19+
mkdir -p "$out/itgmania/Themes/${finalAttrs.pname}"
20+
mv * "$out/itgmania/Themes/${finalAttrs.pname}"
21+
'';
22+
23+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
24+
25+
meta = {
26+
description = "Arrow Cloud's fork of Zmod";
27+
homepage = "https://github.com/Arrow-Cloud/theme";
28+
license = lib.licenses.gpl3Plus;
29+
maintainers = with lib.maintainers; [ ungeskriptet ];
30+
};
31+
})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromCodeberg,
5+
nix-update-script,
6+
}:
7+
stdenv.mkDerivation (finalAttrs: {
8+
pname = "digital-dance";
9+
version = "1.1.1-unstable-2026-03-20";
10+
11+
src = fetchFromCodeberg {
12+
owner = "JNero";
13+
repo = "Digital-Dance-ITGMania";
14+
rev = "7e27fa15b0c80518803be7bf92da5e63d1a4abdd";
15+
hash = "sha256-B/YKmIXrXl6PD0CQJESDKB999//K1nwgjN5CPEMa6fc=";
16+
};
17+
18+
postInstall = ''
19+
mkdir -p "$out/itgmania/Themes/${finalAttrs.pname}"
20+
mv * "$out/itgmania/Themes/${finalAttrs.pname}"
21+
'';
22+
23+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
24+
25+
meta = {
26+
description = "A theme for ITGMania to (hopefully) utilize all of it's features and more";
27+
homepage = "https://codeberg.org/JNero/Digital-Dance-ITGMania";
28+
# https://codeberg.org/JNero/Digital-Dance-ITGMania/issues/1
29+
license = lib.licenses.free;
30+
maintainers = with lib.maintainers; [ ungeskriptet ];
31+
};
32+
})
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
}:
7+
stdenv.mkDerivation (finalAttrs: {
8+
pname = "itg2-sm5";
9+
version = "1.1.0-unstable-2025-10-08";
10+
11+
src = fetchFromGitHub {
12+
owner = "JoseVarelaP";
13+
repo = "In-The-Groove2-SM5";
14+
rev = "e25f1a44efa55cd2247891f40633403910b75d21";
15+
hash = "sha256-FMyT7ZA/1cqiClXDvD7CmJlOFaaWnPLuOuei6fsbzg8=";
16+
};
17+
18+
postInstall = ''
19+
mkdir -p "$out/itgmania/Themes/${finalAttrs.pname}"
20+
mv * "$out/itgmania/Themes/${finalAttrs.pname}"
21+
'';
22+
23+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
24+
25+
meta = {
26+
description = "A Semi-Conversion/Recreation of In The Groove 1 & 2 to StepMania 5";
27+
homepage = "https://github.com/JoseVarelaP/In-The-Groove2-SM5";
28+
license = lib.licenses.gpl3Plus;
29+
maintainers = with lib.maintainers; [ ungeskriptet ];
30+
};
31+
})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
}:
7+
stdenv.mkDerivation (finalAttrs: {
8+
pname = "itg3encore";
9+
version = "0-unstable-2026-03-17";
10+
11+
src = fetchFromGitHub {
12+
owner = "DarkBahamut162";
13+
repo = "itg3encore";
14+
rev = "5efb1a93ca096c8f43d6eee556beabca2f19bc42";
15+
hash = "sha256-m3zU6MdcFEL5ZIraGIh/o8vKiqZUYNMT5JvEc05IAGg=";
16+
};
17+
18+
postInstall = ''
19+
mkdir -p "$out/itgmania/Themes/${finalAttrs.pname}"
20+
mv * "$out/itgmania/Themes/${finalAttrs.pname}"
21+
'';
22+
23+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
24+
25+
meta = {
26+
description = "An upgraded port of ITG3's Encore theme";
27+
homepage = "https://github.com/DarkBahamut162/itg3encore";
28+
# No license specified in the repository
29+
license = lib.licenses.free;
30+
maintainers = with lib.maintainers; [ ungeskriptet ];
31+
};
32+
})
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
}:
7+
stdenv.mkDerivation (finalAttrs: {
8+
pname = "zmod-simply-love";
9+
version = "5.7.0-june-unstable-2025-09-27";
10+
11+
src = fetchFromGitHub {
12+
owner = "zarzob";
13+
repo = "Simply-Love-SM5";
14+
rev = "87b8e5db3452d54121d81554d720e498d20a18fc";
15+
hash = "sha256-8ukHjPUPXo53FWVFm+iyRq2mKlqZ4O+5VlV4ba+mFSM=";
16+
};
17+
18+
postInstall = ''
19+
mkdir -p "$out/itgmania/Themes/${finalAttrs.pname}"
20+
mv * "$out/itgmania/Themes/${finalAttrs.pname}"
21+
'';
22+
23+
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
24+
25+
meta = {
26+
description = "Zmod fork of Simply Love";
27+
homepage = "https://github.com/zarzob/Simply-Love-SM5";
28+
license = lib.licenses.gpl3Plus;
29+
maintainers = with lib.maintainers; [ ungeskriptet ];
30+
};
31+
})
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
cmake,
6+
nasm,
7+
pkg-config,
8+
copyDesktopItems,
9+
alsa-lib,
10+
glew,
11+
glib,
12+
gtk3,
13+
libmad,
14+
libogg,
15+
libpulseaudio,
16+
libusb-compat-0_1,
17+
libvorbis,
18+
libxtst,
19+
udev,
20+
makeWrapper,
21+
makeDesktopItem,
22+
nix-update-script,
23+
}:
24+
25+
stdenv.mkDerivation (finalAttrs: {
26+
pname = "itgmania";
27+
version = "1.2.0";
28+
29+
src = fetchFromGitHub {
30+
owner = "itgmania";
31+
repo = "itgmania";
32+
tag = "v${finalAttrs.version}";
33+
fetchSubmodules = true;
34+
hash = "sha256-RkV/OIDudt2XemhaFRY7IA5o7Q2w+j01tauD7KpzYpA=";
35+
};
36+
37+
nativeBuildInputs = [
38+
cmake
39+
nasm
40+
pkg-config
41+
makeWrapper
42+
copyDesktopItems
43+
];
44+
45+
buildInputs = [
46+
alsa-lib
47+
glew
48+
glib
49+
gtk3
50+
libmad
51+
libogg
52+
libpulseaudio
53+
libusb-compat-0_1
54+
libvorbis
55+
libxtst
56+
udev
57+
];
58+
59+
cmakeFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "-DWITH_MINIMAID=off" ];
60+
61+
postInstall = ''
62+
makeWrapper $out/itgmania/itgmania $out/bin/itgmania \
63+
--chdir $out/itgmania
64+
65+
mkdir -p $out/share/icons/hicolor/scalable/apps/
66+
ln -s $out/itgmania/Data/logo.svg $out/share/icons/hicolor/scalable/apps/itgmania.svg
67+
'';
68+
69+
desktopItems = [
70+
(makeDesktopItem {
71+
name = "itgmania";
72+
desktopName = "ITGmania";
73+
genericName = "Rhythm and dance game";
74+
tryExec = "itgmania";
75+
exec = "itgmania";
76+
terminal = false;
77+
icon = "itgmania";
78+
type = "Application";
79+
comment = "A cross-platform rhythm video game.";
80+
categories = [
81+
"Game"
82+
"ArcadeGame"
83+
];
84+
})
85+
];
86+
87+
passthru.updateScript = nix-update-script { };
88+
89+
meta = {
90+
homepage = "https://www.itgmania.com/";
91+
description = "Fork of StepMania 5.1, improved for the post-ITG community";
92+
platforms = lib.platforms.linux;
93+
license = lib.licenses.mit;
94+
maintainers = with lib.maintainers; [
95+
ftsimas
96+
maxwell-lt
97+
ungeskriptet
98+
];
99+
mainProgram = "itgmania";
100+
};
101+
})

pkgs/top-level/all-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6642,6 +6642,8 @@ with pkgs;
66426642
'';
66436643
});
66446644

6645+
itgmaniaPackages = recurseIntoAttrs (callPackage ../by-name/it/itgmania/packages.nix { });
6646+
66456647
itk_5_2 = callPackage ../development/libraries/itk/5.2.x.nix {
66466648
enableRtk = false;
66476649
};

0 commit comments

Comments
 (0)