sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit d5b5955a344fab493f4dad1798ccdcbdbfb4e1f2
parent e5b96de0f61042ffdc73467b27baf0423e5b58a9
Author: Dan Callaghan <djc@djc.id.au>
Date:   Mon,  6 Apr 2026 10:04:57 +1000

test against Ruby 4.0

Diffstat:
M .github/workflows/checks.yml | 1 +
M Manifest.txt | 1 +
A contrib/nix/ruby4.0-shell.nix | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
@@ -26,6 +26,7 @@ jobs:
         - '3.2'
         - '3.3'
         - '3.4'
+        - '4.0'
         exclude:
         # We use xapian-bindings 1.4.22 for Ruby < 3.1, but it does not link on MacOS 14:
         # https://github.com/Garaio-REM/xapian-ruby/issues/10
diff --git a/Manifest.txt b/Manifest.txt
@@ -51,6 +51,7 @@ contrib/nix/ruby3.2-gemset.nix
 contrib/nix/ruby3.2-shell.nix
 contrib/nix/ruby3.3-shell.nix
 contrib/nix/ruby3.4-shell.nix
+contrib/nix/ruby4.0-shell.nix
 contrib/nix/test-all-rubies.sh
 devel/console.sh
 devel/count-loc.sh
diff --git a/contrib/nix/ruby4.0-shell.nix b/contrib/nix/ruby4.0-shell.nix
@@ -0,0 +1,40 @@
+let
+  pkgs = import (builtins.fetchGit {
+    url = "https://github.com/NixOS/nixpkgs";
+    ref = "refs/heads/master";
+    rev = "6de3b4b649253e8e0c7229edc3726d8a717b93fe";
+  }) { };
+  gems = pkgs.bundlerEnv {
+    name = "ruby4.0-gems-for-sup";
+    ruby = pkgs.ruby_4_0;
+    gemfile = ./Gemfile;
+    lockfile = ./Gemfile.lock;
+    gemset = ./gemset.nix;
+    gemConfig = pkgs.defaultGemConfig // {
+      rmail = attrs: {
+        dontBuild = false;
+        patches = [
+          # Frozen string literals: https://github.com/terceiro/rmail/pull/13
+          (pkgs.fetchpatch2 {
+            name = "rmail-frozen-string-literals.patch";
+            url = "https://github.com/terceiro/rmail/pull/13/commits/27f455af1fea0be0aa09959cc2237cbdf68de2a1.patch";
+            hash = "sha256-N5X9zix+WPoEugp2DBTu7dRDmesrF5pT/8Td2wraYoA=";
+          })
+        ];
+      };
+      xapian-ruby =
+        attrs:
+        pkgs.defaultGemConfig.xapian-ruby attrs
+        // {
+          env.LANG = "C.UTF-8";
+        };
+    };
+  };
+in
+pkgs.mkShell {
+  packages = [
+    gems
+    gems.wrappedRuby
+    pkgs.pandoc
+  ];
+}