sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 40da2bbec0a5fd2c09d46ef7c7d1fd46d83ca38d
parent 1953c3f3a0a049a8605d103d493e19b263b6e07a
Author: Dan Callaghan <djc@djc.id.au>
Date:   Sun,  7 Apr 2024 15:56:13 +1000

contrib/nix: patch ncursesw gem to undefine allocator

Fixes "undefining the allocator of T_DATA class" warnings from ncursesw.

This patch is temporary until I release a new version of the ncursesw
gem.

Diffstat:
M contrib/nix/ruby2.4-shell.nix | 9 +++++++++
M contrib/nix/ruby2.5-shell.nix | 9 +++++++++
M contrib/nix/ruby2.6-shell.nix | 9 +++++++++
M contrib/nix/ruby2.7-shell.nix | 11 +++++++++++
M contrib/nix/ruby3.0-shell.nix | 11 +++++++++++
M contrib/nix/ruby3.1-shell.nix | 11 +++++++++++
M contrib/nix/ruby3.2-shell.nix | 11 +++++++++++
M contrib/nix/ruby3.3-shell.nix | 11 +++++++++++
8 files changed, 82 insertions(+), 0 deletions(-)
diff --git a/contrib/nix/ruby2.4-shell.nix b/contrib/nix/ruby2.4-shell.nix
@@ -11,6 +11,15 @@ let
     lockfile = ./ruby2.4-Gemfile.lock;
     gemset = ./ruby2.4-gemset.nix;
     gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            sha256 = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
       # Workaround: remove rake from nativeBuildInputs, otherwise it causes
       # xapian-bindings to build against the default Ruby version
       # instead of our chosen version.
diff --git a/contrib/nix/ruby2.5-shell.nix b/contrib/nix/ruby2.5-shell.nix
@@ -11,6 +11,15 @@ let
     lockfile = ./ruby2.5-Gemfile.lock;
     gemset = ./ruby2.5-gemset.nix;
     gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            sha256 = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
       # Workaround: remove rake from nativeBuildInputs, otherwise it causes
       # xapian-bindings to build against the default Ruby version
       # instead of our chosen version.
diff --git a/contrib/nix/ruby2.6-shell.nix b/contrib/nix/ruby2.6-shell.nix
@@ -11,6 +11,15 @@ let
     lockfile = ./ruby2.6-Gemfile.lock;
     gemset = ./ruby2.6-gemset.nix;
     gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            sha256 = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
       # Workaround: remove rake from nativeBuildInputs, otherwise it causes
       # xapian-bindings to build against the default Ruby version
       # instead of our chosen version.
diff --git a/contrib/nix/ruby2.7-shell.nix b/contrib/nix/ruby2.7-shell.nix
@@ -10,5 +10,16 @@ let
     gemfile = ./Gemfile;
     lockfile = ./Gemfile.lock;
     gemset = ./gemset.nix;
+    gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            hash = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
+    };
   };
 in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }
diff --git a/contrib/nix/ruby3.0-shell.nix b/contrib/nix/ruby3.0-shell.nix
@@ -10,5 +10,16 @@ let
     gemfile = ./Gemfile;
     lockfile = ./Gemfile.lock;
     gemset = ./gemset.nix;
+    gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            hash = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
+    };
   };
 in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }
diff --git a/contrib/nix/ruby3.1-shell.nix b/contrib/nix/ruby3.1-shell.nix
@@ -10,5 +10,16 @@ let
     gemfile = ./Gemfile;
     lockfile = ./Gemfile.lock;
     gemset = ./gemset.nix;
+    gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            hash = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
+    };
   };
 in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }
diff --git a/contrib/nix/ruby3.2-shell.nix b/contrib/nix/ruby3.2-shell.nix
@@ -10,5 +10,16 @@ let
     gemfile = ./Gemfile;
     lockfile = ./Gemfile.lock;
     gemset = ./gemset.nix;
+    gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            hash = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
+    };
   };
 in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }
diff --git a/contrib/nix/ruby3.3-shell.nix b/contrib/nix/ruby3.3-shell.nix
@@ -10,5 +10,16 @@ let
     gemfile = ./Gemfile;
     lockfile = ./Gemfile.lock;
     gemset = ./gemset.nix;
+    gemConfig = pkgs.defaultGemConfig // {
+      ncursesw = attrs: (pkgs.defaultGemConfig.ncursesw attrs) // {
+        dontBuild = false;
+        patches = [
+          (pkgs.fetchpatch {
+            url = "https://github.com/sup-heliotrope/ncursesw-ruby/commit/1db8ae8d06ce906ddd8b3910782897084eb5cdcc.patch?full_index=1";
+            hash = "sha256-1uGV1iTYitstzmmIvGlQC+3Pc7qf3XApawt1Kacu8XA=";
+          })
+        ];
+      };
+    };
   };
 in pkgs.mkShell { packages = [ gems gems.wrappedRuby pkgs.pandoc ]; }