Subject: [PATCH v2] gnu: zig: Set rss_max to unlimited for 0.14

From: Tommy Langhelle <[email-masked]>
Date: Fri, 4 Apr 2025 13:53:19 +0200

Upstream sets this for CI purposes, but it fails my ARM builds. The
limit itself doesn't make too much sense as long as zig builds and the
build host is big enough, so simply allowing unlimited rss should be
fine.

* gnu/packages/zig.scm (zig-0.14)[source]: Set max_rss to unlimited.
---
 gnu/packages/zig.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/zig.scm b/gnu/packages/zig.scm
index 733251242e..17c859ad70 100644
--- a/gnu/packages/zig.scm
+++ b/gnu/packages/zig.scm
@@ -1871,7 +1871,12 @@ (define-public zig-0.14
         (search-patches
          "zig-0.14-use-baseline-cpu-by-default.patch"
          "zig-0.14-use-system-paths.patch"
-         "zig-0.14-fix-runpath.patch"))))
+         "zig-0.14-fix-runpath.patch"))
+         (snippet
+          #~(begin
+            #$(origin-snippet (package-source zig-0.13))
+            (substitute* "build.zig"
+              ((".max_rss = [0-9_]+,") ".max_rss = 0,"))))))
     (inputs
      (modify-inputs (package-inputs zig-0.13)
        (replace "clang" clang-19)

base-commit: e7aeec67feaa5cf888f0aae14400fc015390aa8e
-- 
2.41.0