27 pcre portaudio freetype
28 SDL2 SDL2_image SDL2_gfx SDL2_mixer SDL2_net SDL2_ttf
29 sqlite lua zlib libX11 libGLU libGL ffmpeg_4
32 in stdenv.mkDerivation rec {
33 pname = "ultrastardx";
36 src = fetchFromGitHub {
37 owner = "UltraStar-Deluxe";
40 hash = "sha256-KvYfWdpgN72F8Y5iFNba0SCjPoS33O3FAdrrC49xoGo=";
43 nativeBuildInputs = [ pkg-config autoreconfHook ];
44 buildInputs = [ fpc libpng ] ++ sharedLibs;
47 substituteInPlace src/config.inc.in \
48 --subst-var-by libpcre_LIBNAME libpcre.so.1
50 # ultrastardx binds to libffmpeg (and sublibs), specifying a very restrictive
51 # upper bounds on the minor versions of .so files.
52 # We can assume ffmpeg_4 won’t break any major ABI compatibility, since it's
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 = "https://usdx.eu/";
82 description = "Free and open source karaoke game";
83 license = licenses.gpl2Plus;
84 maintainers = with maintainers; [ Profpatsch ];