2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, cmake
|
|
|
|
, nasm
|
|
|
|
, alsa-lib
|
|
|
|
, ffmpeg_6
|
|
|
|
, glew
|
|
|
|
, glib
|
|
|
|
, gtk2
|
|
|
|
, libmad
|
|
|
|
, libogg
|
|
|
|
, libpulseaudio
|
|
|
|
, libvorbis
|
|
|
|
, udev
|
|
|
|
, xorg
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
stdenv.mkDerivation {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "stepmania";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.1.0-b2-unstable-2022-11-14";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stepmania";
|
|
|
|
repo = "stepmania";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "d55acb1ba26f1c5b5e3048d6d6c0bd116625216f";
|
|
|
|
hash = "sha256-49H2Q61R4l/G0fWsjCjiAUXeWwG3lcsDpV5XvR3l3QE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
patches = [
|
2024-01-02 11:29:13 +00:00
|
|
|
# https://github.com/stepmania/stepmania/pull/2247
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-building-with-ffmpeg6.patch";
|
|
|
|
url = "https://github.com/stepmania/stepmania/commit/3fef5ef60b7674d6431f4e1e4ba8c69b0c21c023.patch";
|
|
|
|
hash = "sha256-m+5sP+mIpcSjioRBdzChqja5zwNcwdSNAfvSJ2Lww+g=";
|
|
|
|
})
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <ctime>' -i src/arch/ArchHooks/ArchHooks.h # gcc12
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake nasm ];
|
|
|
|
|
|
|
|
buildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
alsa-lib
|
|
|
|
ffmpeg_6
|
|
|
|
glew
|
|
|
|
glib
|
|
|
|
gtk2
|
|
|
|
libmad
|
|
|
|
libogg
|
|
|
|
libpulseaudio
|
|
|
|
libvorbis
|
|
|
|
udev
|
|
|
|
xorg.libXtst
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_SYSTEM_FFMPEG=1"
|
|
|
|
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
|
|
|
|
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/stepmania-5.1/stepmania $out/bin/stepmania
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/
|
|
|
|
cp -r $src/icons $out/share/
|
|
|
|
|
|
|
|
install -Dm444 $src/stepmania.desktop -t $out/share/applications
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.stepmania.com/";
|
|
|
|
description = "Free dance and rhythm game for Windows, Mac, and Linux";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.mit; # expat version
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ h7x4 ];
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-linux since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isLinux && stdenv.isAarch64;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "stepmania";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|