about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libpostal
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
commit9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch)
tree4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/development/libraries/libpostal
parenta9cbfb6941b47d6f50129e6e36927882392daed7 (diff)
parent2344fe1da14cb08b0c18743b207995f9b8597915 (diff)
downloadnixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libpostal')
-rw-r--r--nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch24
-rw-r--r--nixpkgs/pkgs/development/libraries/libpostal/default.nix14
2 files changed, 37 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch b/nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch
new file mode 100644
index 000000000000..cddd20d29e95
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libpostal/0001-test-adding-header-to-fix-warning.patch
@@ -0,0 +1,24 @@
+From bfdb6b8f87cc1cae9ba47870ff23deae0bb8ba51 Mon Sep 17 00:00:00 2001
+From: Al <albarrentine@gmail.com>
+Date: Sun, 17 Dec 2017 20:17:01 -0500
+Subject: [PATCH] [test] adding header to fix warning
+
+---
+ test/test_expand.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/test_expand.c b/test/test_expand.c
+index 59ed9af7..2b211728 100644
+--- a/test/test_expand.c
++++ b/test/test_expand.c
+@@ -4,6 +4,7 @@
+ #include <stdarg.h>
+ 
+ #include "greatest.h"
++#include "../src/string_utils.h"
+ #include "../src/libpostal.h"
+ 
+ SUITE(libpostal_expansion_tests);
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/development/libraries/libpostal/default.nix b/nixpkgs/pkgs/development/libraries/libpostal/default.nix
index 30c7af9ccc56..fbeb60022a1d 100644
--- a/nixpkgs/pkgs/development/libraries/libpostal/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libpostal/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
 
 stdenv.mkDerivation rec {
   pname = "libpostal";
@@ -11,6 +11,18 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-gQTD2LQibaB2TK0SbzoILAljAGExURvDcF3C/TfDXqk=";
   };
 
+  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
+  ];
+
   nativeBuildInputs = [ autoreconfHook ];
 
   configureFlags = [