27 pcre portaudio freetype
28 SDL2 SDL2_image SDL2_gfx SDL2_mixer SDL2_net SDL2_ttf
29 sqlite lua zlib libX11 libGLU libGL ffmpeg
32 in stdenv.mkDerivation rec {
33 pname = "ultrastardx";
34 version = "2021-04-03";
35 src = fetchFromGitHub {
36 owner = "UltraStar-Deluxe";
38 rev = "d49e916705092f3d765d85d276b283b9e7e232a6";
39 sha256 = "0sdcz2vc8i2z50nj7zbkdpxx2mvx0m0927lfsj7d7qr0p8vkm0wa";
42 nativeBuildInputs = [ pkg-config autoreconfHook ];
43 buildInputs = [ fpc libpng ] ++ sharedLibs;
46 substituteInPlace src/config.inc.in \
47 --subst-var-by libpcre_LIBNAME libpcre.so.1
49 # ultrastardx binds to libffmpeg (and sublibs), specifying a very restrictive
50 # upper bounds on the minor versions of .so files.
51 # We can assume ffmpeg won’t break any major ABI compatibility, since their
52 # patch version seems to always stay at 100,
53 # and their minor version changes quite frequently.
55 -e 's/^ LIBAVCODEC_MAX_VERSION_MINOR.*$/ LIBAVCODEC_MAX_VERSION_MINOR = 1000;/' \
56 -i src/lib/ffmpeg-4.0/avcodec.pas
58 -e 's/^ LIBAVFORMAT_MAX_VERSION_MINOR.*$/ LIBAVFORMAT_MAX_VERSION_MINOR = 1000;/' \
59 -i src/lib/ffmpeg-4.0/avformat.pas
61 -e 's/^ LIBAVUTIL_MAX_VERSION_MINOR.*$/ LIBAVUTIL_MAX_VERSION_MINOR = 1000;/' \
62 -i src/lib/ffmpeg-4.0/avutil.pas
64 -e 's/^ LIBSWRESAMPLE_MAX_VERSION_MINOR.*$/ LIBSWRESAMPLE_MAX_VERSION_MINOR = 1000;/' \
65 -i src/lib/ffmpeg-4.0/swresample.pas
67 -e 's/^ LIBSWSCALE_MAX_VERSION_MINOR.*$/ LIBSWSCALE_MAX_VERSION_MINOR = 1000;/' \
68 -i src/lib/ffmpeg-4.0/swscale.pas
72 let items = concatMapStringsSep " " (x: "-rpath ${getLib x}/lib") sharedLibs;
74 export NIX_LDFLAGS="$NIX_LDFLAGS ${items}"
77 # dlopened libgcc requires the rpath not to be shrinked
81 homepage = "http://ultrastardx.sourceforge.net/";
82 description = "Free and open source karaoke game";
83 license = licenses.gpl2Plus;
84 maintainers = with maintainers; [ Profpatsch ];