Change:
Package name: Latest released version: <!-- Search your package here: --- Current version on the unstable channel: Current version on the stable/release channel: <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- Notify maintainers <!-- If the result shows no maintainers, tag the person that last updated the package. --Note for maintainers: Please tag this issue in your PR.

Discussion:
<del> { lib , stdenv , fetchFromGitHub , alsa-lib , cmake , ffmpeg , fribidi , game-music-emu , libXdmcp , libXv , libass , libcddb , libcdio , libpulseaudio , libsidplayfp , libva , libxcb , pkg-config , qtbase , qttools , taglib , vulkan-headers , vulkan-tools , wrapQtAppsHook }: stdenv.mkDerivation (finalAttrs: { pname = "qmplay2"; version = "24.04.07"; src = fetchFromGitHub { owner = "zaps166"; repo = "QMPlay2"; rev = finalAttrs.version; fetchSubmodules = true; hash = "sha256-WIDGApvl+aaB3Vdv0sHY+FHWqzreWWd3/xOLV11YfxM="; }; nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; buildInputs = [ alsa-lib ffmpeg fribidi game-music-emu libXdmcp libXv libass libcddb libcdio libpulseaudio libsidplayfp libva libxcb qtbase qttools taglib vulkan-headers vulkan-tools ]; postInstall = '' # Because we think it is better to use only lowercase letters! ln -s $out/bin/QMPlay2 $out/bin/qmplay2 ''; meta = { homepage = "https://github.com/zaps166/QMPlay2/"; description = "Qt-based Multimedia player"; longDescription = '' QMPlay2 is a video and audio player. It can play all formats supported by FFmpeg, libmodplug (including J2B and SFX). It also supports Audio CD, raw files, Rayman 2 music and chiptunes. It contains YouTube and MyFreeMP3 browser. ''; changelog = "https://github.com/zaps166/QMPlay2/releases/tag/${finalAttrs.version}"; license = lib.licenses.lgpl3Plus; maintainers = with lib.maintainers; [ AndersonTorres kashw2 ]; platforms = lib.platforms.linux; }; }) </del>

<ins> { lib, alsa-lib, callPackage, cmake, ffmpeg, fribidi, game-music-emu, libXdmcp, libXv, libass, libcddb, libcdio, libpulseaudio, libsidplayfp, libva, libxcb, ninja, pkg-config, qt5, qt6, stdenv, taglib, vulkan-headers, vulkan-tools, # Configurable options qtVersion ? "6", # Can be 5 or 6 }: let sources = callPackage ./sources.nix { }; in assert lib.elem qtVersion [ "5" "6" ]; stdenv.mkDerivation (finalAttrs: { pname = sources.qmplay2.pname + "-qt" + qtVersion; inherit (sources.qmplay2) version src; postPatch = '' pushd src cp -va ${sources.qmvk.src}/* qmvk/ chmod --recursive 744 qmvk popd ''; nativeBuildInputs = [ cmake ninja pkg-config ] ++ lib.optionals (qtVersion == "6") [ qt6.wrapQtAppsHook ] ++ lib.optionals (qtVersion == "5") [ qt5.wrapQtAppsHook ]; buildInputs = [ alsa-lib ffmpeg fribidi game-music-emu libXdmcp libXv libass libcddb libcdio libpulseaudio libsidplayfp libva libxcb taglib vulkan-headers vulkan-tools ] ++ lib.optionals (qtVersion == "6") [ qt6.qt5compat qt6.qtbase qt6.qtsvg qt6.qttools ] ++ lib.optionals (qtVersion == "5") [ qt5.qtbase qt5.qttools ]; strictDeps = true; # Because we think it is better to use only lowercase letters! # But sometimes we come across case-insensitive filesystems... postInstall = '' [ -e $out/bin/qmplay2 ] || ln -s $out/bin/QMPlay2 $out/bin/qmplay2 ''; passthru = { inherit sources; }; meta = { homepage = "https://github.com/zaps166/QMPlay2/"; description = "Qt-based Multimedia player"; longDescription = '' QMPlay2 is a video and audio player. It can play all formats supported by FFmpeg and libmodplug (including J2B and SFX). It also supports Audio CD, raw files, Rayman 2 music, and chiptunes. It also contains YouTube and MyFreeMP3 browser. ''; license = lib.licenses.lgpl3Plus; mainProgram = "qmplay2"; maintainers = with lib.maintainers; [ AndersonTorres kashw2 ]; platforms = lib.platforms.linux; }; }) </ins>

<ins> { fetchFromGitHub, }: { qmplay2 = let self = { pname = "qmplay2"; version = "24.06.16"; src = fetchFromGitHub { owner = "zaps166"; repo = "QMPlay2"; rev = self.version; hash = "sha256-HoFyC/OFmthUYfyo6//+KmBIq06MPb5GmDekJbnsz5o="; }; }; in self; qmvk = { pname = "qmvk"; version = "0-unstable-2024-04-19"; src = fetchFromGitHub { owner = "zaps166"; repo = "QmVk"; rev = "5c5c2942255820b6343afdfeea0405cd3b36870e"; hash = "sha256-viFM9N5PiSCgkGlxtrLFCVDIML/QyPiaPRX77RW2NNw="; }; }; } </ins>

qmediathekview = libsForQt5.callPackage ../applications/video/qmediathekview { }; <del> qmplay2 = libsForQt5.callPackage ../applications/video/qmplay2 { }; </del> <ins> qmplay2-qt5 = qmplay2.override { qtVersion = "5"; }; qmplay2-qt6 = qmplay2.override { qtVersion = "6"; }; </ins> qmidiarp = callPackage ../applications/audio/qmidiarp { };