nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 131 lines 3.0 kB view raw
1{ stdenv 2, lib 3, fetchurl 4, gettext 5, meson 6, ninja 7, pkg-config 8, asciidoc 9, gobject-introspection 10, python3 11, docbook-xsl-nons 12, docbook_xml_dtd_45 13, libxml2 14, glib 15, wrapGAppsNoGuiHook 16, vala 17, sqlite 18, libxslt 19, libstemmer 20, gnome 21, icu 22, libuuid 23, libsoup 24, libsoup_3 25, json-glib 26, systemd 27, dbus 28}: 29 30stdenv.mkDerivation rec { 31 pname = "tracker"; 32 version = "3.3.0"; 33 34 outputs = [ "out" "dev" "devdoc" ]; 35 36 src = fetchurl { 37 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; 38 sha256 = "Bwb5b+f5XfQqzsgSwd57RZOg1kgyHKg1BqnXHiJBe9o="; 39 }; 40 41 nativeBuildInputs = [ 42 meson 43 ninja 44 vala 45 pkg-config 46 asciidoc 47 gettext 48 libxslt 49 wrapGAppsNoGuiHook 50 gobject-introspection 51 docbook-xsl-nons 52 docbook_xml_dtd_45 53 python3 # for data-generators 54 systemd # used for checks to install systemd user service 55 dbus # used for checks and pkg-config to install dbus service/s 56 ] ++ checkInputs; # gi is in the main meson.build and checked regardless of 57 # whether tests are enabled 58 59 buildInputs = [ 60 glib 61 libxml2 62 sqlite 63 icu 64 libsoup 65 libsoup_3 66 libuuid 67 json-glib 68 libstemmer 69 ]; 70 71 checkInputs = with python3.pkgs; [ 72 pygobject3 73 ]; 74 75 mesonFlags = [ 76 "-Ddocs=true" 77 ]; 78 79 doCheck = true; 80 81 postPatch = '' 82 patchShebangs utils/g-ir-merge/g-ir-merge 83 patchShebangs utils/data-generators/cc/generate 84 patchShebangs tests/functional-tests/test-runner.sh.in 85 patchShebangs tests/functional-tests/*.py 86 patchShebangs examples/python/endpoint.py 87 ''; 88 89 preCheck = '' 90 # (tracker-store:6194): Tracker-CRITICAL **: 09:34:07.722: Cannot initialize database: Could not open sqlite3 database:'/homeless-shelter/.cache/tracker/meta.db': unable to open database file 91 export HOME=$(mktemp -d) 92 93 # Our gobject-introspection patches make the shared library paths absolute 94 # in the GIR files. When running functional tests, the library is not yet installed, 95 # though, so we need to replace the absolute path with a local one during build. 96 # We are using a symlink that will be overridden during installation. 97 mkdir -p $out/lib 98 ln -s $PWD/src/libtracker-sparql/libtracker-sparql-3.0.so $out/lib/libtracker-sparql-3.0.so.0 99 ''; 100 101 checkPhase = '' 102 runHook preCheck 103 104 dbus-run-session \ 105 --config-file=${dbus.daemon}/share/dbus-1/session.conf \ 106 meson test \ 107 --timeout-multiplier 2 \ 108 --print-errorlogs 109 110 runHook postCheck 111 ''; 112 113 postCheck = '' 114 # Clean up out symlinks 115 rm -r $out/lib 116 ''; 117 118 passthru = { 119 updateScript = gnome.updateScript { 120 packageName = pname; 121 }; 122 }; 123 124 meta = with lib; { 125 homepage = "https://wiki.gnome.org/Projects/Tracker"; 126 description = "Desktop-neutral user information store, search tool and indexer"; 127 maintainers = teams.gnome.members; 128 license = licenses.gpl2Plus; 129 platforms = platforms.linux; 130 }; 131}