2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2022-12-28 21:21:41 +00:00
|
|
|
, stdenv
|
2020-12-25 13:55:36 +00:00
|
|
|
, fetchFromGitHub
|
2023-04-29 16:46:19 +00:00
|
|
|
, fetchpatch
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
, cmake
|
2022-02-20 05:27:41 +00:00
|
|
|
, qttools
|
2022-12-28 21:21:41 +00:00
|
|
|
, wrapQtAppsHook
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
, curl
|
|
|
|
, ffmpeg
|
|
|
|
, libmediainfo
|
|
|
|
, libzen
|
2022-12-28 21:21:41 +00:00
|
|
|
, qt5compat ? null # qt6 only
|
2020-12-25 13:55:36 +00:00
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qtmultimedia
|
2021-05-03 20:48:10 +00:00
|
|
|
, qtsvg
|
2022-12-28 21:21:41 +00:00
|
|
|
, qtwayland
|
2022-02-10 20:34:41 +00:00
|
|
|
, quazip
|
2020-12-25 13:55:36 +00:00
|
|
|
}:
|
2022-12-28 21:21:41 +00:00
|
|
|
let
|
|
|
|
qtVersion = lib.versions.major qtbase.version;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-25 13:55:36 +00:00
|
|
|
pname = "mediaelch";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "2.10.0";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Komet";
|
|
|
|
repo = "MediaElch";
|
|
|
|
rev = "v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
sha256 = "sha256-hipOOG+ibfsJZKLcnB6a5+OOvSs4WUdpEY+RiVKJc+k=";
|
2020-12-25 13:55:36 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/Komet/MediaElch/issues/1557
|
|
|
|
# build: Fix build issue with Qt 6.5 on macOS (also other platforms)
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/Komet/MediaElch/commit/872b21decf95d70073400bedbe1ad183a8267791.patch";
|
|
|
|
hash = "sha256-D1Ui5xg5cpvNX4IHfXQ7wN9I7Y3SuPFOWxWidcAlLEA=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
qttools
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
ffmpeg
|
|
|
|
libmediainfo
|
|
|
|
libzen
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
qtmultimedia
|
|
|
|
qtsvg
|
|
|
|
qtwayland
|
|
|
|
quazip
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.optionals (qtVersion == "6") [
|
2022-12-28 21:21:41 +00:00
|
|
|
qt5compat
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DDISABLE_UPDATER=ON"
|
|
|
|
"-DUSE_EXTERN_QUAZIP=ON"
|
|
|
|
"-DMEDIAELCH_FORCE_QT${qtVersion}=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
# libmediainfo.so.0 is loaded dynamically
|
2022-02-20 05:27:41 +00:00
|
|
|
qtWrapperArgs = [
|
|
|
|
"--prefix LD_LIBRARY_PATH : ${libmediainfo}/lib"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://mediaelch.de/mediaelch/";
|
|
|
|
description = "Media Manager for Kodi";
|
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ stunkymonkey ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|