2024-06-19 13:07:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
alsa-lib,
|
2024-06-19 15:50:40 +00:00
|
|
|
callPackage,
|
2024-06-19 13:07:52 +00:00
|
|
|
cmake,
|
|
|
|
ffmpeg,
|
|
|
|
fribidi,
|
|
|
|
game-music-emu,
|
|
|
|
libXdmcp,
|
|
|
|
libXv,
|
|
|
|
libass,
|
|
|
|
libcddb,
|
|
|
|
libcdio,
|
|
|
|
libpulseaudio,
|
|
|
|
libsidplayfp,
|
|
|
|
libva,
|
|
|
|
libxcb,
|
2024-07-23 02:39:44 +00:00
|
|
|
ninja,
|
2024-06-19 13:07:52 +00:00
|
|
|
pkg-config,
|
|
|
|
qt5,
|
2024-07-23 02:39:44 +00:00
|
|
|
qt6,
|
2024-06-19 13:07:52 +00:00
|
|
|
stdenv,
|
|
|
|
taglib,
|
|
|
|
vulkan-headers,
|
|
|
|
vulkan-tools,
|
2024-07-23 02:39:44 +00:00
|
|
|
# Configurable options
|
|
|
|
qtVersion ? "6", # Can be 5 or 6
|
2020-11-28 00:02:38 +00:00
|
|
|
}:
|
2023-03-27 02:03:51 +00:00
|
|
|
|
2024-06-19 15:50:40 +00:00
|
|
|
let
|
|
|
|
sources = callPackage ./sources.nix { };
|
|
|
|
in
|
2024-07-26 12:18:34 +00:00
|
|
|
assert lib.elem qtVersion [
|
|
|
|
"5"
|
|
|
|
"6"
|
|
|
|
];
|
2023-04-16 20:10:09 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-07-23 02:39:44 +00:00
|
|
|
pname = sources.qmplay2.pname + "-qt" + qtVersion;
|
|
|
|
inherit (sources.qmplay2) version src;
|
2020-11-28 00:02:38 +00:00
|
|
|
|
2024-07-23 02:37:48 +00:00
|
|
|
postPatch = ''
|
|
|
|
pushd src
|
|
|
|
cp -va ${sources.qmvk.src}/* qmvk/
|
|
|
|
chmod --recursive 744 qmvk
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2024-07-26 12:18:34 +00:00
|
|
|
nativeBuildInputs =
|
|
|
|
[
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
]
|
|
|
|
++ lib.optionals (qtVersion == "6") [ qt6.wrapQtAppsHook ]
|
|
|
|
++ lib.optionals (qtVersion == "5") [ qt5.wrapQtAppsHook ];
|
2023-03-27 02:03:51 +00:00
|
|
|
|
2024-07-26 12:18:34 +00:00
|
|
|
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
|
|
|
|
];
|
2020-11-28 00:02:38 +00:00
|
|
|
|
2024-07-03 17:25:52 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2024-06-19 13:07:52 +00:00
|
|
|
# Because we think it is better to use only lowercase letters!
|
|
|
|
# But sometimes we come across case-insensitive filesystems...
|
2024-07-26 12:23:08 +00:00
|
|
|
postInstall = ''
|
2024-06-19 13:07:52 +00:00
|
|
|
[ -e $out/bin/qmplay2 ] || ln -s $out/bin/QMPlay2 $out/bin/qmplay2
|
2020-11-28 00:02:38 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-23 02:37:48 +00:00
|
|
|
passthru = {
|
|
|
|
inherit sources;
|
|
|
|
};
|
|
|
|
|
2023-03-27 02:03:51 +00:00
|
|
|
meta = {
|
2020-11-28 00:02:38 +00:00
|
|
|
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
|
2024-07-26 15:34:18 +00:00
|
|
|
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.
|
2020-11-28 00:02:38 +00:00
|
|
|
'';
|
2023-03-27 02:03:51 +00:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
2024-06-19 13:07:52 +00:00
|
|
|
mainProgram = "qmplay2";
|
2024-07-26 12:18:34 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
AndersonTorres
|
|
|
|
kashw2
|
|
|
|
];
|
2023-03-27 02:03:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-11-28 00:02:38 +00:00
|
|
|
};
|
2023-03-27 02:03:51 +00:00
|
|
|
})
|