Skip to content

Commit

Permalink
contrib/nix: patch ncursesw gem to undefine allocator
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danc86 committed Apr 7, 2024
1 parent 1953c3f commit 40da2bb
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contrib/nix/ruby2.4-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions contrib/nix/ruby2.5-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions contrib/nix/ruby2.6-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
11 changes: 11 additions & 0 deletions contrib/nix/ruby2.7-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]; }
11 changes: 11 additions & 0 deletions contrib/nix/ruby3.0-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]; }
11 changes: 11 additions & 0 deletions contrib/nix/ruby3.1-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]; }
11 changes: 11 additions & 0 deletions contrib/nix/ruby3.2-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]; }
11 changes: 11 additions & 0 deletions contrib/nix/ruby3.3-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]; }

0 comments on commit 40da2bb

Please sign in to comment.