2024-10-11 05:15:48 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitLab,
|
|
|
|
gitUpdater,
|
|
|
|
testers,
|
|
|
|
boost,
|
|
|
|
cmake,
|
|
|
|
cmake-extras,
|
|
|
|
dbus,
|
|
|
|
dbus-cpp,
|
|
|
|
gdk-pixbuf,
|
|
|
|
glib,
|
|
|
|
gst_all_1,
|
|
|
|
gtest,
|
|
|
|
libapparmor,
|
|
|
|
libexif,
|
|
|
|
pkg-config,
|
|
|
|
properties-cpp,
|
|
|
|
qtbase,
|
|
|
|
qtdeclarative,
|
|
|
|
shared-mime-info,
|
|
|
|
sqlite,
|
|
|
|
taglib,
|
|
|
|
udisks,
|
|
|
|
wrapQtAppsHook,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "mediascanner2";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "0.117";
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "ubports";
|
|
|
|
repo = "development/core/mediascanner2";
|
|
|
|
rev = finalAttrs.version;
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-e1vDPnIIfevXj9ODEEKJ2y4TiU0H+08aTf2vU+emdQk=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/qml/MediaScanner.*/CMakeLists.txt \
|
2024-10-11 05:15:48 +00:00
|
|
|
--replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
gst_all_1.gstreamer # GST_PLUGIN_SYSTEM_PATH_1_0 setup hook
|
|
|
|
pkg-config
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
boost
|
|
|
|
cmake-extras
|
|
|
|
dbus
|
|
|
|
dbus-cpp
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
libapparmor
|
|
|
|
libexif
|
|
|
|
properties-cpp
|
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
|
|
|
shared-mime-info
|
|
|
|
sqlite
|
|
|
|
taglib
|
|
|
|
udisks
|
|
|
|
]
|
|
|
|
++ (with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
]);
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
checkInputs = [ gtest ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
cmakeFlags = [ (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
|
|
|
|
export XDG_DATA_DIRS=${shared-mime-info}/share:$XDG_DATA_DIRS
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
qtWrapperArgs+=(
|
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
|
|
|
|
--prefix XDG_DATA_DIRS : ${shared-mime-info}/share
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
|
|
|
updateScript = gitUpdater { };
|
|
|
|
};
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
meta = {
|
2024-01-02 11:29:13 +00:00
|
|
|
description = "Media scanner service & access library";
|
|
|
|
homepage = "https://gitlab.com/ubports/development/core/mediascanner2";
|
2024-10-11 05:15:48 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
maintainers = lib.teams.lomiri.members;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "mediascanner-service-2.0";
|
2024-10-11 05:15:48 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
pkgConfigModules = [ "mediascanner-2.0" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
})
|