summary refs log tree commit diff
path: root/pkgs/development/misc/resholve
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:21 +0100
committerAlyssa Ross <hi@alyssa.is>2023-11-21 16:12:48 +0100
commit048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch)
treef8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/development/misc/resholve
parent030c5028b07afcedce7c5956015c629486cc79d9 (diff)
parent4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff)
downloadnixpkgs-rootfs.tar
nixpkgs-rootfs.tar.gz
nixpkgs-rootfs.tar.bz2
nixpkgs-rootfs.tar.lz
nixpkgs-rootfs.tar.xz
nixpkgs-rootfs.tar.zst
nixpkgs-rootfs.zip
Rebase onto e4ad989506ec7d71f7302cc3067abd82730a4beb HEAD rootfs
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/development/misc/resholve')
-rw-r--r--pkgs/development/misc/resholve/0014-clang_incompatible_function_pointer_conversions.patch42
-rw-r--r--pkgs/development/misc/resholve/README.md2
-rw-r--r--pkgs/development/misc/resholve/oildev.nix4
3 files changed, 47 insertions, 1 deletions
diff --git a/pkgs/development/misc/resholve/0014-clang_incompatible_function_pointer_conversions.patch b/pkgs/development/misc/resholve/0014-clang_incompatible_function_pointer_conversions.patch
new file mode 100644
index 00000000000..52d5e6adfe7
--- /dev/null
+++ b/pkgs/development/misc/resholve/0014-clang_incompatible_function_pointer_conversions.patch
@@ -0,0 +1,42 @@
+diff -ur a/decoder.c b/decoder.c
+--- a/decoder.c	1980-01-02 00:00:00.000000000 -0500
++++ b/decoder.c	2023-11-08 17:42:43.981838074 -0500
+@@ -94,7 +94,7 @@
+     return PlaceObject(ctx, PyBool_FromLong((long)(value)));
+ }
+ 
+-static int handle_number(void *ctx, const char *value, unsigned int length)
++static int handle_number(void *ctx, const char *value, size_t length)
+ {
+     //fprintf(stderr, "handle_number: ");
+     //fwrite(value, length, 1, stderr);
+@@ -127,7 +127,7 @@
+     return status;
+ }
+ 
+-static int handle_string(void *ctx, const unsigned char *value, unsigned int length)
++static int handle_string(void *ctx, const unsigned char *value, size_t length)
+ {
+     return PlaceObject(ctx, PyString_FromStringAndSize((char *)value, length));
+ }
+@@ -142,7 +142,7 @@
+     return success;
+ }
+ 
+-static int handle_dict_key(void *ctx, const unsigned char *value, unsigned int length)
++static int handle_dict_key(void *ctx, const unsigned char *value, size_t length)
+ {
+     PyObject *object = PyString_FromStringAndSize((const char *) value, length);
+ 
+diff -ur a/yajl.c b/yajl.c
+--- a/yajl.c	1980-01-02 00:00:00.000000000 -0500
++++ b/yajl.c	2023-11-08 17:41:18.781350335 -0500
+@@ -161,7 +161,7 @@
+ }
+ 
+ static struct PyMethodDef yajl_methods[] = {
+-    {"dumps", (PyCFunctionWithKeywords)(py_dumps), METH_VARARGS | METH_KEYWORDS,
++    {"dumps", (PyCFunction)(py_dumps), METH_VARARGS | METH_KEYWORDS,
+ "yajl.dumps(obj [, indent=None])\n\n\
+ Returns an encoded JSON string of the specified `obj`\n\
+ \n\
diff --git a/pkgs/development/misc/resholve/README.md b/pkgs/development/misc/resholve/README.md
index c3be4ad5b9f..082a7fe757a 100644
--- a/pkgs/development/misc/resholve/README.md
+++ b/pkgs/development/misc/resholve/README.md
@@ -203,7 +203,7 @@ more copies of their specification/behavior than I like, and continuing to
 add more at this early date will only ensure that I spend more time updating
 docs and less time filling in feature gaps.
 
-Full documentation may be greatly accellerated if someone can help me sort out
+Full documentation may be greatly accelerated if someone can help me sort out
 single-sourcing. See: https://github.com/abathur/resholve/issues/19
 -->
 
diff --git a/pkgs/development/misc/resholve/oildev.nix b/pkgs/development/misc/resholve/oildev.nix
index 3e7dbc8e010..2459c492ebc 100644
--- a/pkgs/development/misc/resholve/oildev.nix
+++ b/pkgs/development/misc/resholve/oildev.nix
@@ -42,6 +42,10 @@ rec {
       hash = "sha256-H3GKN0Pq1VFD5+SWxm8CXUVO7zAyj/ngKVmDaG/aRT4=";
       fetchSubmodules = true;
     };
+    patches = [
+      # Fixes several incompatible function pointer conversions, which are errors in clang 16.
+      ./0014-clang_incompatible_function_pointer_conversions.patch
+    ];
     # just for submodule IIRC
     nativeBuildInputs = [ git ];
   };