diff --git a/srcpkgs/file/template b/srcpkgs/file/template
index 5becfa5e2b..7f8d55859c 100644
--- a/srcpkgs/file/template
+++ b/srcpkgs/file/template
@@ -13,6 +13,11 @@ license="2-clause-BSD"
 distfiles="ftp://ftp.astron.com/pub/file/file-${version}.tar.gz"
 checksum=2ef32b4ec936b0ff7b59a021dce56086a716663b6df1138c7ea597d396bf50cf
 
+if [ "$CROSS_BUILD" ]; then
+	# XXX cross compilation needs exactly the same version for the host
+	hostmakedepends="file"
+fi
+
 post_install() {
 	vlicense COPYING
 }