NixOS/nixpkgs — pull request #1390 by DanielOertwig (2013-12-16 18:47:13+00:00)
Title: libxml2 without python: Add "--with-python=no" to configure flags on all systems

If the flag `--with-python=no` is not specified on the configure command line, libxml2 will be built with python support enabled. This causes configure to search for python by itself, eventually using python distributions found when searching from `/`

When using nix in a rootless configuration, this causes libxml2 to be built against python from its host system. If the host system does not provide a python distribution, building libxml2 fails.

This happened when I did a `nix-env -K -f nixpkgs -iA libxml2` in a clean rootless nix configuration. The error message was:

libxml.c:14:20: fatal error: Python.h: No such file or directory

Searching `TMPDIR/nix-build*/libxml2*/config.log` revealed the actual command line parameters to configure.

I don't know why the flag was only added on FreeBSD systems before, at least in my rootless configuration running on an Arch Linux amd64 host system I did not experience any error so far.
Maybe vcunat@9220d5b knows more about this?

I did not test this on NixOS, so someone should probably in case this gets merged.