The doc build was failing because of an unpatched `/usr/bin/env` shebang
in the `pygments.rb` gem, and weechat uses asciidoctor with the pygments
highlighter. Adding `python3` to `pygments.rb`'s `buildInputs` fixes it.
Currently, `pkgs.ruby` is ruby 2.7.6, which is in 'security updates
only' mode and scheduled to go EOL April 2023. Updating `pkgs.ruby`
to be ruby 3.1 would be a rather large change, but using ruby 3 to
bootstrap building ruby itself would be a nice first step in that
direction.
Tested with asciidoctor that this indeed now allows building a ruby
application without getting ruby 2.7 in the build closure.
Also fixes#192729
Upstream commit 0a5d9828c1f6b32e8462a00029b1ba2a720c867b changed how the
extension build script detects an Apple toolchain; adjust accordingly by
forcing it to be false. Keep both fixes so this is more compatible.
allows building bundix but most ruby gems still fail with
```
++ gem install --local --force --http-proxy http://nodtd.invalid --ignore-dependencies --install-dir /nix/store/...-ruby-aarch64-unknown-linux-gnu2.7.6-nio4r-2.5.8-aarch64-unknown-linux-gnu/lib/ruby/gems/2.7.0
--build-root / --backtrace --no-env-shebang -N /nix/store/...-nio4r-2.5.8.gem --
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 8: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 9: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 10: require: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 12: required_version: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 14: unless: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 15: abort: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 16: end: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 18: args: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 20: begin: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 21: Gem::GemRunner.new.run: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 22: rescue: command not found
/nix/store/...-ruby-aarch64-unknown-linux-gnu-2.7.6/bin/gem: line 23: exit: e.exit_code: numeric argument required
```