nixos: 16.03pre73316.93d8671
when I install lxml with
nix-env -iA nixos.libxml2
the header files are in ../include/libxml2/libxml/*h. Most apps require
I solved that by adding that path to C_INCLUDE_PATH, but probably better solution would be to remove this one level of directory, what do you think?
(my particular use case is to install lxml with virtualenv/pip)
It's better to use pkgconfig. So either install it or do nix-shell -p libxml2 before using virtualenv
@domenkozar thank you for help. Looks like lxml is already using pkgconfig but I had no it installed.
nix-shell -p libxml2 could be helpful here, how it's different than nix-env -iA nixos.libxml2?Hello @spinus
I have the same issue. Could you please describe how you solved it?
@BernardNotarianni
My default.nix for build lxml and grab:
with import <nixpkgs> {}; {
pyEnv = stdenv.mkDerivation {
name = "py_libxml2_grab";
buildInputs = [ stdenv libxml2 libxslt curl ];
C_INCLUDE_PATH="${libxml2}/include/libxml2:${libxslt}/include/libxslt:${curl}/include/curl";
};
}
Just use nix-shell . and then pip install lxml grab
Most helpful comment
@BernardNotarianni
My
default.nixfor buildlxmlandgrab:Just use
nix-shell .and thenpip install lxml grab