2023-11-26 00:23:45 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-11-26 01:18:18 +01:00
|
|
|
, fetchpatch
|
2023-11-26 00:23:45 +01:00
|
|
|
, cmake
|
|
|
|
, nasm
|
|
|
|
, alsa-lib
|
2023-11-26 01:18:18 +01:00
|
|
|
, ffmpeg_6
|
2023-11-26 00:23:45 +01:00
|
|
|
, glew
|
|
|
|
, glib
|
|
|
|
, gtk2
|
|
|
|
, libmad
|
|
|
|
, libogg
|
|
|
|
, libpulseaudio
|
|
|
|
, libvorbis
|
|
|
|
, udev
|
2023-11-26 01:18:18 +01:00
|
|
|
, xorg
|
2015-11-21 00:43:25 +01:00
|
|
|
}:
|
2013-05-16 06:53:49 +02:00
|
|
|
|
2023-11-26 01:18:18 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "stepmania";
|
2023-11-26 01:18:18 +01:00
|
|
|
version = "5.1.0-b2-unstable-2022-11-14";
|
2013-05-16 06:53:49 +02:00
|
|
|
|
2015-04-20 17:16:38 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stepmania";
|
|
|
|
repo = "stepmania";
|
2023-11-26 01:18:18 +01:00
|
|
|
rev = "d55acb1ba26f1c5b5e3048d6d6c0bd116625216f";
|
|
|
|
hash = "sha256-49H2Q61R4l/G0fWsjCjiAUXeWwG3lcsDpV5XvR3l3QE=";
|
2013-05-16 06:53:49 +02:00
|
|
|
};
|
|
|
|
|
2021-11-07 06:51:49 +01:00
|
|
|
patches = [
|
2023-11-26 01:18:18 +01: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-11-07 06:51:49 +01:00
|
|
|
];
|
|
|
|
|
2023-02-05 14:56:47 +01:00
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <ctime>' -i src/arch/ArchHooks/ArchHooks.h # gcc12
|
|
|
|
'';
|
|
|
|
|
2015-11-21 00:43:25 +01:00
|
|
|
nativeBuildInputs = [ cmake nasm ];
|
|
|
|
|
2015-04-20 17:16:38 +02:00
|
|
|
buildInputs = [
|
2023-11-26 00:23:45 +01:00
|
|
|
alsa-lib
|
2023-11-26 01:18:18 +01:00
|
|
|
ffmpeg_6
|
2023-11-26 00:23:45 +01:00
|
|
|
glew
|
|
|
|
glib
|
|
|
|
gtk2
|
|
|
|
libmad
|
|
|
|
libogg
|
|
|
|
libpulseaudio
|
|
|
|
libvorbis
|
|
|
|
udev
|
2023-11-26 01:18:18 +01:00
|
|
|
xorg.libXtst
|
2015-04-20 17:16:38 +02:00
|
|
|
];
|
|
|
|
|
2015-11-21 00:43:25 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DWITH_SYSTEM_FFMPEG=1"
|
2016-04-14 03:11:58 +02:00
|
|
|
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
|
|
|
|
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
|
2015-11-21 00:43:25 +01:00
|
|
|
];
|
2013-05-16 06:53:49 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
2019-03-03 06:03:51 +01:00
|
|
|
ln -s $out/stepmania-5.1/stepmania $out/bin/stepmania
|
2023-11-26 21:43:00 +01:00
|
|
|
|
|
|
|
mkdir -p $out/share/
|
|
|
|
cp -r $src/icons $out/share/
|
|
|
|
|
|
|
|
install -Dm444 $src/stepmania.desktop -t $out/share/applications
|
2013-05-16 06:53:49 +02:00
|
|
|
'';
|
2014-01-28 17:24:00 +01:00
|
|
|
|
2015-11-21 00:43:25 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.stepmania.com/";
|
2015-11-21 00:43:25 +01:00
|
|
|
description = "Free dance and rhythm game for Windows, Mac, and Linux";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.mit; # expat version
|
2023-11-26 01:18:41 +01:00
|
|
|
maintainers = with maintainers; [ h7x4 ];
|
2022-12-06 21:47:40 +01:00
|
|
|
# never built on aarch64-linux since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isLinux && stdenv.isAarch64;
|
2023-11-23 22:09:35 +01:00
|
|
|
mainProgram = "stepmania";
|
2014-01-28 17:24:00 +01:00
|
|
|
};
|
2013-05-16 06:53:49 +02:00
|
|
|
}
|