1 { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-gQTD2LQibaB2TK0SbzoILAljAGExURvDcF3C/TfDXqk=";
15 # Fix darwin compilation with XCode 12 https://github.com/openvenues/libpostal/issues/511
17 name = "Fix-C-compilation-macOS.patch";
18 url = "https://github.com/openvenues/libpostal/commit/9fcf066e38121b5c1439fc6bdc9a7e02234c8622.patch";
19 hash = "sha256-VpboGK+5sc1XrxMB051KWc8vP7Eu2g7zmTirzSaerns=";
21 # https://github.com/openvenues/libpostal/commit/bfdb6b8f87cc1cae9ba47870ff23deae0bb8ba51.patch
22 # with extra hunk removed so it applies
23 ./0001-test-adding-header-to-fix-warning.patch
26 nativeBuildInputs = [ autoreconfHook ];
29 "--disable-data-download"
30 ] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "--disable-sse2" ];
33 description = "C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data";
34 homepage = "https://github.com/openvenues/libpostal";
35 license = licenses.mit;
36 maintainers = [ maintainers.Thra11 ];
37 mainProgram = "libpostal_data";
38 platforms = platforms.unix;