Then the std is already set correctly, I think the bigger problem is the hardcoded library and include pathes. You might need to patch them to use correct locations
why do you think std is correct? It’s upstream build script and I don’t think buildPythonPackage will take that into account anyway. I believe there’s no hardcoded library problem and this will work once I find out how to tell buildPythonPackage to use c99.
The version in nixpkgs is 1.1 if I understand correctly. The corresponding tag is 5 years old. Perhaps there are newer releases without tags that have been overseen therefore?
Sadly documentation of both libpostalaas well as pypostal us very bad in that regard and doesn’t communicate versions/requirements well.
@myguidingstar do you have a working example? I am running into similar issues trying to build pypostal with poetry2nix. First the error that it can not include libpostal.h which I could resolve but now the error that setuptools is not in the environment. I currently have the following:
I no longer use it, and this piece is extracted from a big blob from the time I even don’t understand overlay, so please help yourself. Also, the revision must be quite old…
{ lib, py, pkgs }:
let libpostal = pkgs.libpostal.overrideAttrs (_: {
src = pkgs.fetchFromGitHub {
owner = "openvenues";
repo = "libpostal";
rev = "9c975972985b54491e756efd70e416f18ff97958";
sha256 = "sha256-7G/CjYdVzsrvUFXGODoXgXoRp8txkl5SddcPtgltrjY=";
};
});
in
{ postal = py.buildPythonPackage rec {
pname = "postal";
version = "1.1.9";
src = py.fetchPypi {
inherit pname version;
sha256 = "2158fde6872d57c342b384ca1d0eadd562dc466a8a36f1160919e8189864b1b1";
};
doCheck = false;
propagatedBuildInputs = [ libpostal py.nose py.six];
prePatch = ''
substituteInPlace setup.py \
--replace /usr/local/include "${libpostal}/include" \
--replace /usr/local/lib "${libpostal}/lib"
'';
meta = with lib; {
homepage = "https://github.com/openvenues/pypostal";
description = "Python bindings to libpostal for fast international address parsing/normalization";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
};
...