summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Milata <martin@martinmilata.cz>2020-06-18 16:37:56 +0200
committerMartin Milata <martin@martinmilata.cz>2020-07-02 18:30:24 +0200
commitb39c3a1a1772e2f40057de9f158fa08bc009b596 (patch)
tree52c690deba08f3925387e0c85066cb72c8ed1762
parent9aadc464af0ad768275265ad3d196d410e90f3e9 (diff)
downloadnixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.tar
nixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.tar.gz
nixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.tar.bz2
nixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.tar.lz
nixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.tar.xz
nixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.tar.zst
nixpkgs-b39c3a1a1772e2f40057de9f158fa08bc009b596.zip
zmap: support json_c-0.14
-rw-r--r--pkgs/tools/security/zmap/cmake-json-0.14-fix.patch13
-rw-r--r--pkgs/tools/security/zmap/default.nix5
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/tools/security/zmap/cmake-json-0.14-fix.patch b/pkgs/tools/security/zmap/cmake-json-0.14-fix.patch
new file mode 100644
index 00000000000..1c132948af6
--- /dev/null
+++ b/pkgs/tools/security/zmap/cmake-json-0.14-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8bd825f..694d9b2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -72,6 +72,8 @@ if(WITH_JSON)
+     endif()
+ 
+     add_definitions("-DJSON")
++    # JSON_CFLAGS is a list, i.e. semicolon-separated, convert it to space-separated
++    string(REPLACE ";" " " JSON_CFLAGS "${JSON_CFLAGS}")
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}")
+ endif()
+ 
diff --git a/pkgs/tools/security/zmap/default.nix b/pkgs/tools/security/zmap/default.nix
index ef36b21641b..e2350b67c7d 100644
--- a/pkgs/tools/security/zmap/default.nix
+++ b/pkgs/tools/security/zmap/default.nix
@@ -13,6 +13,11 @@ stdenv.mkDerivation rec {
     sha256 = "0yaahaiawkjk020hvsb8pndbrk8k10wxkfba1irp12a4sj6rywcs";
   };
 
+  patches = [
+    # fix build with json-c 0.14 https://github.com/zmap/zmap/pull/609
+    ./cmake-json-0.14-fix.patch
+  ];
+
   cmakeFlags = [ "-DRESPECT_INSTALL_PREFIX_CONFIG=ON" ];
   dontUseCmakeBuildDir = true;