about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libaccounts-glib
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libaccounts-glib')
-rw-r--r--nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix b/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix
index 8dfc222f36ac..e20ad1c954d1 100644
--- a/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libaccounts-glib/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitLab, meson, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
+{ lib, stdenv, fetchFromGitLab, meson, mesonEmulatorHook, ninja, glib, check, python3, vala, gtk-doc, glibcLocales
 , libxml2, libxslt, pkg-config, sqlite, docbook_xsl, docbook_xml_dtd_43, gobject-introspection }:
 
 stdenv.mkDerivation rec {
@@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
     ninja
     pkg-config
     vala
+  ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
+    mesonEmulatorHook
   ];
 
   buildInputs = [
@@ -38,6 +40,12 @@ stdenv.mkDerivation rec {
     sqlite
   ];
 
+  # TODO: send patch upstream to make running tests optional
+  postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+    substituteInPlace meson.build \
+      --replace "subdir('tests')" ""
+  '';
+
   LC_ALL = "en_US.UTF-8";
 
   mesonFlags = [