@@ -21,7 +21,8 @@ stdenv.mkDerivation rec {
2121 sha256 = "0gzpdgfwzlqj2n3amf2zhi2hlpa412878yphgx79y6b5gn1y1lm2";
2222 };
2323
24− outputs = [ "out" "man" "test" ];
24+ outputs = [ "out" "man" ]
25+ ++ stdenv.lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) "test";
2526
2627 nativeBuildInputs = [
2728 autoreconfHook
@@ -38,7 +39,9 @@ stdenv.mkDerivation rec {
3839
3940 checkInputs = [ openssl ];
4041
41− pythonPath = [
42+ # wrapPython wraps the scripts in $test. They pull in gobject-introspection,
43+ # which doesn't cross-compile.
44+ pythonPath = stdenv.lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [
4245 python3Packages.dbus-python
4346 python3Packages.pygobject3
4447 ];
@@ -61,11 +64,12 @@ stdenv.mkDerivation rec {
6164 doCheck = true;
6265
6366 postInstall = ''
64− mkdir -p $test/bin
65− cp -a test/* $test/bin/
6667 mkdir -p $out/share
6768 cp -a doc $out/share/
6869 cp -a README AUTHORS TODO $out/share/doc/
70+ '' + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
71+ mkdir -p $test/bin
72+ cp -a test/* $test/bin/
6973 '';
7074
7175 preFixup = ''