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";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.10.6";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Komet";
|
|
|
|
repo = "MediaElch";
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-qc7HaCMAmALY9MoIKmaCWF0cnwBBFDAXwqiBzwzu2bU=";
|
2020-12-25 13:55:36 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|