nixpkgs/pkgs/development/libraries/libpostal/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.4 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
2021-01-03 20:46:40 +00:00
stdenv.mkDerivation rec {
pname = "libpostal";
2021-03-12 01:00:15 +00:00
version = "1.1";
2021-01-03 20:46:40 +00:00
src = fetchFromGitHub {
owner = "openvenues";
repo = "libpostal";
rev = "v${version}";
2021-03-12 01:00:15 +00:00
sha256 = "sha256-gQTD2LQibaB2TK0SbzoILAljAGExURvDcF3C/TfDXqk=";
2021-01-03 20:46:40 +00:00
};
patches = [
# Fix darwin compilation with XCode 12 https://github.com/openvenues/libpostal/issues/511
(fetchpatch {
name = "Fix-C-compilation-macOS.patch";
url = "https://github.com/openvenues/libpostal/commit/9fcf066e38121b5c1439fc6bdc9a7e02234c8622.patch";
hash = "sha256-VpboGK+5sc1XrxMB051KWc8vP7Eu2g7zmTirzSaerns=";
})
# https://github.com/openvenues/libpostal/commit/bfdb6b8f87cc1cae9ba47870ff23deae0bb8ba51.patch
# with extra hunk removed so it applies
./0001-test-adding-header-to-fix-warning.patch
];
2021-01-03 20:46:40 +00:00
nativeBuildInputs = [ autoreconfHook ];
configureFlags = [
"--disable-data-download"
] ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "--disable-sse2" ];
meta = with lib; {
description = "A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data";
homepage = "https://github.com/openvenues/libpostal";
license = licenses.mit;
maintainers = [ maintainers.Thra11 ];
mainProgram = "libpostal_data";
2022-04-16 12:00:45 +00:00
platforms = platforms.unix;
2021-01-03 20:46:40 +00:00
};
}