With the v6.0.0 release of the `rbnacl` gem, it does not longer depends on `rbnacl-libsodium` gem (which is now deprecated ([1])) to package the `libsodium` library and should use the one provided by the distribution; it raises an error if `rbnacl-libsodium` is detected ([2]). Unfortunately, default gem config patches `rbnacl` unconditionally ([3]), which means that newer versions of `rbnacl` fail at startup. [1]: https://github.com/crypto-rb/rbnacl-libsodium/issues/29 [2]: https://github.com/crypto-rb/rbnacl/blob/c176fc0bd8be74cf62c93a4b122e220ce4895348/lib/rbnacl.rb#L4-L8 [3]: https://github.com/NixOS/nixpkgs/blob/9fd099a6ae1690909ebf40145e4cdabd67179676/pkgs/development/ruby-modules/gem-config/default.nix#L300-L306