diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/tracker/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/tracker/default.nix | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/libraries/tracker/default.nix b/nixpkgs/pkgs/development/libraries/tracker/default.nix index e8d6ed82ed00..1df7553e6c69 100644 --- a/nixpkgs/pkgs/development/libraries/tracker/default.nix +++ b/nixpkgs/pkgs/development/libraries/tracker/default.nix @@ -1,21 +1,23 @@ { stdenv , lib , fetchurl +, fetchpatch , gettext , meson , ninja , pkg-config , asciidoc , gobject-introspection +, buildPackages +, withIntrospection ? stdenv.hostPlatform.emulatorAvailable buildPackages +, vala , python3 -, docbook-xsl-nons -, docbook_xml_dtd_45 +, gi-docgen +, graphviz , libxml2 , glib , wrapGAppsNoGuiHook -, vala , sqlite -, libxslt , libstemmer , gnome , icu @@ -30,18 +32,26 @@ stdenv.mkDerivation rec { pname = "tracker"; - version = "3.3.2"; + version = "3.5.1"; outputs = [ "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "DtK5iRiVbW8WQpxgfdihTIT02gpIlw/S64yTq6PPmRM="; + sha256 = "+XLVCse6/czxE7HrmdyuNUBGhameVb/vFvOsg7Tel00="; }; - postPatch = '' - patchShebangs utils/data-generators/cc/generate - ''; + patches = [ + # Backport sqlite-3.42.0 compatibility: + # https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/600 + (fetchpatch { + name = "sqlite-3.42.0.patch"; + url = "https://gitlab.gnome.org/GNOME/tracker/-/commit/4cbbd1773a7367492fa3b3e3804839654e18a12a.patch"; + hash = "sha256-w5D9I0P1DdyILhpjslh6ifojmlUiBoeFnxHPIr0rO3s="; + }) + ]; + + strictDeps = true; depsBuildBuild = [ pkg-config @@ -50,20 +60,20 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ meson ninja - vala pkg-config asciidoc gettext - libxslt + glib wrapGAppsNoGuiHook - gobject-introspection - docbook-xsl-nons - docbook_xml_dtd_45 + gi-docgen + graphviz (python3.pythonForBuild.withPackages (p: [ p.pygobject3 ])) + ] ++ lib.optionals withIntrospection [ + gobject-introspection + vala ]; buildInputs = [ - gobject-introspection glib libxml2 sqlite @@ -78,8 +88,15 @@ stdenv.mkDerivation rec { systemd ]; + nativeCheckInputs = [ + dbus + ]; + mesonFlags = [ "-Ddocs=true" + (lib.mesonEnable "introspection" withIntrospection) + (lib.mesonEnable "vapi" withIntrospection) + (lib.mesonBool "test_utils" withIntrospection) ] ++ ( let # https://gitlab.gnome.org/GNOME/tracker/-/blob/master/meson.build#L159 @@ -95,7 +112,21 @@ stdenv.mkDerivation rec { "-Dsystemd_user_services=false" ]; - doCheck = true; + doCheck = + # https://gitlab.gnome.org/GNOME/tracker/-/issues/402 + !stdenv.isDarwin + # https://gitlab.gnome.org/GNOME/tracker/-/issues/398 + && !stdenv.is32bit; + + postPatch = '' + chmod +x \ + docs/reference/libtracker-sparql/embed-files.py \ + docs/reference/libtracker-sparql/generate-svgs.sh + patchShebangs \ + utils/data-generators/cc/generate \ + docs/reference/libtracker-sparql/embed-files.py \ + docs/reference/libtracker-sparql/generate-svgs.sh + ''; preCheck = let @@ -119,7 +150,7 @@ stdenv.mkDerivation rec { runHook preCheck dbus-run-session \ - --config-file=${dbus.daemon}/share/dbus-1/session.conf \ + --config-file=${dbus}/share/dbus-1/session.conf \ meson test \ --timeout-multiplier 2 \ --print-errorlogs @@ -132,6 +163,11 @@ stdenv.mkDerivation rec { rm -r $out/lib ''; + postFixup = '' + # Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back. + moveToOutput "share/doc" "$devdoc" + ''; + passthru = { updateScript = gnome.updateScript { packageName = pname; |