about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libpostal
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libpostal')
-rw-r--r--nixpkgs/pkgs/development/libraries/libpostal/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libpostal/default.nix b/nixpkgs/pkgs/development/libraries/libpostal/default.nix
new file mode 100644
index 000000000000..30c7af9ccc56
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpostal/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "libpostal";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "openvenues";
+    repo = "libpostal";
+    rev = "v${version}";
+    sha256 = "sha256-gQTD2LQibaB2TK0SbzoILAljAGExURvDcF3C/TfDXqk=";
+  };
+
+  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";
+    platforms = platforms.unix;
+  };
+}