summary refs log tree commit diff
path: root/pkgs/development/ruby-modules
diff options
context:
space:
mode:
authorStanisław Pitucha <git@viraptor.info>2023-05-20 16:58:39 +1000
committerStanisław Pitucha <git@viraptor.info>2023-05-21 07:38:18 +1000
commitb0f92293e9772839a06f6eaf92c0d5704420b84d (patch)
tree5e0e5dc044f422b3bd7e7b40b4f505ecee823490 /pkgs/development/ruby-modules
parent48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a (diff)
downloadnixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.tar
nixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.tar.gz
nixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.tar.bz2
nixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.tar.lz
nixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.tar.xz
nixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.tar.zst
nixpkgs-b0f92293e9772839a06f6eaf92c0d5704420b84d.zip
rubyPackages.ruby-terminfo: fix ruby 3 build
`rubyio.h` was a backwards compatibility hack, removed in recent versions.
Use `ruby/io.h` instead.
`rb_cData` was deprecated in https://bugs.ruby-lang.org/issues/18433 and
removed in Ruby 3.2.
Diffstat (limited to 'pkgs/development/ruby-modules')
-rw-r--r--pkgs/development/ruby-modules/gem-config/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix
index 5dba1c0cf09..e1e8a8ec0bb 100644
--- a/pkgs/development/ruby-modules/gem-config/default.nix
+++ b/pkgs/development/ruby-modules/gem-config/default.nix
@@ -649,6 +649,13 @@ in
       "--with-cflags=-I${ncurses.dev}/include"
       "--with-ldflags=-L${ncurses.out}/lib"
     ];
+    dontBuild = false;
+    postPatch = ''
+      substituteInPlace extconf.rb --replace 'rubyio.h' 'ruby/io.h'
+      substituteInPlace terminfo.c \
+        --replace 'rubyio.h' 'ruby/io.h' \
+        --replace 'rb_cData' 'rb_cObject'
+    '';
   };
 
   ruby-vips = attrs: {