tracker-miners: add darwin support

This commit is contained in:
Weijia Wang 2022-08-25 20:32:39 +02:00
parent ada79f0720
commit b34ed33471
2 changed files with 35 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, meson, ninja, pkg-config, gettext, libxml2, gobject-introspection, gnome, glib }:
{ lib, stdenv, fetchpatch, fetchurl, meson, ninja, pkg-config, gettext, libxml2, gobject-introspection, gnome, glib }:
stdenv.mkDerivation rec {
pname = "totem-pl-parser";
@ -9,6 +9,14 @@ stdenv.mkDerivation rec {
sha256 = "wN8PaNXPnX2kPIHH8T8RFYNYNo+Ywi1Hci870EvTrBw=";
};
patches = [
# Upstream MR: https://gitlab.gnome.org/GNOME/totem-pl-parser/-/merge_requests/46
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/totem-pl-parser/-/commit/f4f69c9b99095416aaed18a73f7486ad9eb04aa9.patch";
sha256 = "sha256-Uya5fgFgauv5rIpVK3CDGCieyMus7VjcLMMe/vQ2WWY=";
})
];
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
@ -30,6 +38,6 @@ stdenv.mkDerivation rec {
description = "Simple GObject-based library to parse and save a host of playlist formats";
maintainers = teams.gnome.members;
license = licenses.lgpl2;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchurl
, fetchpatch
, asciidoc
, docbook-xsl-nons
, docbook_xml_dtd_45
@ -43,6 +44,7 @@
, taglib
, upower
, totem-pl-parser
, e2fsprogs
}:
stdenv.mkDerivation rec {
@ -54,6 +56,18 @@ stdenv.mkDerivation rec {
sha256 = "Pt3G0nLAKWn6TCwV360MSddtAh8aJ+xwi2m+gCU1PJQ=";
};
# TODO: remove me on 3.4.0
patches = [
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/tracker-miners/-/commit/cc655ba0f95022cf35bc6d44cb5155788fee2e24.patch";
sha256 = "sha256-a85ygtabpkruiDgKbseQxYbFIAQlVDhs3eWkbStJjKs=";
})
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/tracker-miners/-/commit/9e613ceb37ec41fd1cd88c3d539e3ee03e8f6ba6.patch";
sha256 = "sha256-ht7EfZztyl0st0Sv7H92Q37vwXY4T61GQm9WJ8IxTTg=";
})
];
nativeBuildInputs = [
asciidoc
docbook-xsl-nons
@ -72,7 +86,6 @@ stdenv.mkDerivation rec {
buildInputs = [
bzip2
dbus
evolution-data-server
exempi
giflib
glib
@ -95,16 +108,20 @@ stdenv.mkDerivation rec {
libjpeg
libosinfo
libpng
libseccomp
libsoup
libtiff
libuuid
libxml2
networkmanager
poppler
systemd
taglib
] ++ lib.optionals stdenv.isLinux [
evolution-data-server
libseccomp
networkmanager
systemd
upower
] ++ lib.optionals stdenv.isDarwin [
e2fsprogs
];
mesonFlags = [
@ -115,6 +132,9 @@ stdenv.mkDerivation rec {
# security issue since then. Despite a patch now being availab, we're opting
# to be safe due to the general state of the project
"-Dminer_rss=false"
] ++ lib.optionals (!stdenv.isLinux) [
"-Dnetwork_manager=disabled"
"-Dsystemd_user_services=false"
];
postInstall = ''
@ -132,6 +152,6 @@ stdenv.mkDerivation rec {
description = "Desktop-neutral user information store, search tool and indexer";
maintainers = teams.gnome.members;
license = licenses.gpl2Plus;
platforms = platforms.linux;
platforms = platforms.unix;
};
}