@@ -10,7 +10,7 @@
1010, docbook_xsl
1111, docbook_xml_dtd_412
1212, docbook_xml_dtd_43
13−, glibcLocales
13+, docbook_xml_dtd_45
1414, libxml2
1515, upower
1616, glib
@@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
6161 docbook_xsl
6262 docbook_xml_dtd_412
6363 docbook_xml_dtd_43
64− glibcLocales
64+ docbook_xml_dtd_45
6565 python3 # for data-generators
6666 systemd # used for checks to install systemd user service
6767 dbus # used for checks and pkgconfig to install dbus service/s
@@ -80,15 +80,42 @@ stdenv.mkDerivation rec {
8080 libstemmer
8181 ];
8282
83+ checkInputs = [
84+ python3.pkgs.pygobject3
85+ ];
86+
8387 mesonFlags = [
8488 # TODO: figure out wrapping unit tests, some of them fail on missing gsettings-desktop-schemas
85− "-Dfunctional_tests=false"
89+ # "-Dfunctional_tests=true"
8690 "-Ddocs=true"
8791 ];
8892
93+ doCheck = true;
94+
8995 postPatch = ''
9096 patchShebangs utils/g-ir-merge/g-ir-merge
9197 patchShebangs utils/data-generators/cc/generate
98+ patchShebangs tests/functional-tests/test-runner.sh.in
99+ patchShebangs tests/functional-tests/*.py
100+ '';
101+
102+ preCheck = ''
103+ # (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
104+ export HOME=$(mktemp -d)
105+
106+ # Our gobject-introspection patches make the shared library paths absolute
107+ # in the GIR files. When running functional tests, the library is not yet installed,
108+ # though, so we need to replace the absolute path with a local one during build.
109+ # We are using a symlink that will be overridden during installation.
110+ mkdir -p $out/lib
111+ ln -s $PWD/src/libtracker-sparql-backend/libtracker-sparql-2.0.so $out/lib/libtracker-sparql-2.0.so.0
112+ ln -s $PWD/src/libtracker-miner/libtracker-miner-2.0.so $out/lib/libtracker-miner-2.0.so.0
113+ ln -s $PWD/src/libtracker-data/libtracker-data.so $out/lib/libtracker-data.so
114+ '';
115+
116+ postCheck = ''
117+ # Clean up out symlinks
118+ rm -r $out/lib
92119 '';
93120
94121 postInstall = ''