1 # The standard set of gems in nixpkgs including potential fixes.
3 # The gemset is derived from two points of entry:
4 # - An attrset describing a gem, including version, source and dependencies
5 # This is just meta data, most probably automatically generated by a tool
6 # like Bundix (https://github.com/aflatter/bundix).
10 # sha256 = "1s4x0f5by9xs2y24jk6krq5ky7ffkzmxgr4z1nhdykdmpsi2zd0l";
11 # dependencies = [ "rake" ];
13 # - An optional derivation that may override how the gem is built. For popular
14 # gems that don't behave correctly, fixes are already provided in the form of
17 # This separates "what to build" (the exact gem versions) from "how to build"
18 # (to make gems behave if necessary).
20 { lib, fetchurl, fetchpatch2, writeScript, ruby, libkrb5, libxml2, libxslt, python2, stdenv, which
21 , libiconv, postgresql, nodejs, clang, sqlite, zlib, imagemagick, lasem
22 , pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi
23 , cmake, libssh2, openssl, openssl_1_1, libmysqlclient, git, perl, pcre2, gecode_3, curl
24 , libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk3, lerc, buildRubyGem
25 , cairo, expat, re2, rake, gobject-introspection, gdk-pixbuf, zeromq, czmq, graphicsmagick, libcxx
26 , file, libvirt, glib, vips, taglib, libopus, linux-pam, libidn, protobuf, fribidi, harfbuzz
27 , bison, flex, pango, python3, patchelf, binutils, freetds, wrapGAppsHook3, atk
28 , bundler, libsass, dart-sass, libexif, libselinux, libsepol, shared-mime-info, libthai, libdatrie
29 , CoreServices, DarwinTools, cctools, libtool, discount, exiv2, libepoxy, libxkbcommon, libmaxminddb, libyaml
30 , cargo, rustc, rustPlatform, libsysprof-capture
31 , autoSignDarwinBinariesHook
35 rainbow_rake = buildRubyGem {
38 source.sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n";
46 meta.mainProgram = "zentest";
50 dependencies = attrs.dependencies ++ [ "gobject-introspection" ];
51 nativeBuildInputs = [ rake bundler pkg-config ]
52 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
53 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 atk ];
58 templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/";
60 # patching shebangs would fail on the templates/Executable file, so we
61 # temporarily remove the executable flag.
62 preFixup = "chmod -x $out/${templates}/Executable";
64 chmod +x $out/${templates}/Executable
66 # Allows to load another bundler version
67 sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
72 nativeBuildInputs = [ pkg-config ]
73 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
74 buildInputs = [ cairo expat glib libsysprof-capture pcre2 xorg.libpthreadstubs xorg.libXdmcp ];
77 cairo-gobject = attrs: {
78 nativeBuildInputs = [ pkg-config ]
79 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
80 buildInputs = [ cairo expat libsysprof-capture pcre2 xorg.libpthreadstubs xorg.libXdmcp ];
83 charlock_holmes = attrs: {
84 buildInputs = [ which icu zlib ];
88 nativeBuildInputs = [ pkg-config ];
89 buildInputs = [ protobuf ];
92 cocoapods-acknowledgements = attrs: {
93 dependencies = attrs.dependencies ++ [ "cocoapods" ];
96 cocoapods-deploy = attrs: {
97 dependencies = [ "cocoapods" ];
100 cocoapods-disable-podfile-validations = attrs: {
101 dependencies = [ "cocoapods" ];
104 cocoapods-generate = attrs: {
105 dependencies = attrs.dependencies ++ [ "cocoapods" ];
108 cocoapods-git_url_rewriter = attrs: {
109 dependencies = [ "cocoapods" ];
112 cocoapods-keys = attrs: {
113 dependencies = attrs.dependencies ++ [ "cocoapods" ];
116 cocoapods-open = attrs: {
117 dependencies = [ "cocoapods" ];
120 cocoapods-try-release-fix = attrs: {
121 dependencies = [ "cocoapods" ];
125 buildInputs = [ curl ];
130 buildInputs = [ ncurses ];
131 patches = lib.optionals (lib.versionOlder attrs.version "1.4.5") [
132 # Fixes incompatible function pointer type error with clang 16. Fixed in 1.4.5 and newer.
133 # Upstream issue: https://github.com/ruby/curses/issues/85
135 url = "https://github.com/ruby/curses/commit/13e00d07c3aaed83d5f138cf268cc33c9f025d0e.patch?full_index=1";
136 hash = "sha256-ZJ2egqj3Uwmi4KrF79dtwczpwUqFCp52/xQYUymYDmc=";
141 dep-selector-libgecode = attrs: {
142 USE_SYSTEM_GECODE = true;
144 installPath=$(cat $out/nix-support/gem-meta/install-path)
145 sed -i $installPath/lib/dep-selector-libgecode.rb -e 's@VENDORED_GECODE_DIR =.*@VENDORED_GECODE_DIR = "${gecode_3}"@'
149 digest-sha3 = attrs: {
150 hardeningDisable = [ "format" ];
154 # Use discount from nixpkgs instead of vendored version
156 buildInputs = [ discount ];
158 # Adapted from Debian:
159 # https://sources.debian.org/data/main/r/ruby-rdiscount/2.1.8-1/debian/patches/01_use-system-libmarkdown.patch
160 ./rdiscount-use-nixpkgs-libmarkdown.patch
167 substituteInPlace lib/ethon/curls/settings.rb \
168 --replace "libcurl" "${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary}"
173 buildFlags = [ "--with-exiv2-lib=${exiv2}/lib" "--with-exiv2-include=${exiv2.dev}/include" ];
176 fog-dnsimple = attrs:
177 lib.optionalAttrs (lib.versionOlder attrs.version "1.0.1") {
179 cd $(cat $out/nix-support/gem-meta/install-path)
180 rm {$out/bin,bin,../../bin}/{setup,console}
184 redis-rack = attrs: {
188 output="$(gem build $gemspec | tee >(cat - >&3))"
190 sed -i 's!"rake".freeze!!' $gemspec
194 ffi-rzmq-core = attrs: {
196 installPath=$(cat $out/nix-support/gem-meta/install-path)
197 sed -i $installPath/lib/ffi-rzmq-core/libzmq.rb -e 's@inside_gem =.*@inside_gem = "${zeromq}/lib"@'
202 FREEDESKTOP_MIME_TYPES_PATH = "${shared-mime-info}/share/mime/packages/freedesktop.org.xml";
205 mini_magick = attrs: {
207 installPath=$(cat $out/nix-support/gem-meta/install-path)
208 echo -e "\nENV['PATH'] += ':${graphicsmagick}/bin'\n" >> $installPath/lib/mini_magick/configuration.rb
212 do_sqlite3 = attrs: {
213 buildInputs = [ sqlite ];
216 eventmachine = attrs: {
218 buildInputs = [ openssl ];
220 substituteInPlace ext/em.cpp \
221 --replace 'if (bind (' 'if (::bind ('
226 buildFlags = [ "--with-exif-dir=${libexif}" ];
227 buildInputs = [ libexif ];
231 nativeBuildInputs = [ pkg-config ];
232 buildInputs = [ libffi ];
236 buildInputs = [ libffi ];
239 gdk_pixbuf2 = attrs: {
240 nativeBuildInputs = [ pkg-config bundler rake ]
241 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
242 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 gdk-pixbuf ];
246 nativeBuildInputs = [ pkg-config bundler rake ]
247 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
248 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 gdk-pixbuf cairo ];
252 buildInputs = [ gpgme ];
253 nativeBuildInputs = [ pkg-config ];
254 buildFlags = [ "--use-system-libraries" ];
258 nativeBuildInputs = [ pkg-config gobject-introspection ]
259 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
260 buildInputs = [ glib libsysprof-capture pcre2 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux libselinux libsepol ];
263 gitlab-markup = attrs: { meta.priority = 1; };
265 gitlab-pg_query = attrs: lib.optionalAttrs (attrs.version == "1.3.1") {
268 sed -i "s;'https://codeload.github.com.*';'${fetchurl {
269 url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.3";
270 sha256 = "0jfij8apzxsdabl70j42xgd5f3ka1gdcrk764nccp66164gpcchk";
271 }}';" ext/pg_query/extconf.rb
276 meta.mainProgram = "ruby-parse";
279 pg_query = attrs: lib.optionalAttrs (attrs.version == "2.0.2") {
282 sed -i "s;'https://codeload.github.com.*';'${fetchurl {
283 url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/13-2.0.2";
284 sha256 = "0ms2s6hmy8qyzv4g1hj4i2p5fws1v8lrj73b2knwbp2ipd45yj7y";
285 }}';" ext/pg_query/extconf.rb
287 } // lib.optionalAttrs (attrs.version == "1.3.0") {
291 sed -i "s;'https://codeload.github.com.*';'${fetchurl {
292 url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.4";
293 sha256 = "0f0kshhai0pnkqj0w4kgz3fssnvwidllc31n1fysxjjzdqlr1k48";
294 }}';" ext/pg_query/extconf.rb
299 meta.mainProgram = "rbprettier";
302 prometheus-client-mmap = attrs: {
305 getconf = if stdenv.hostPlatform.isGnu then stdenv.cc.libc else getconf;
307 substituteInPlace lib/prometheus/client/page_size.rb --replace "getconf" "${lib.getBin getconf}/bin/getconf"
309 } // lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
310 cargoRoot = "ext/fast_mmaped_file_rs";
311 cargoDeps = rustPlatform.fetchCargoTarball {
312 src = stdenv.mkDerivation {
313 inherit (buildRubyGem { inherit (attrs) gemName version source; })
321 cp -R ext/fast_mmaped_file_rs $out
324 hash = if lib.versionAtLeast attrs.version "1.1.1"
325 then "sha256-RsN5XWX7Mj2ORccM0eczY+44WXsbXNTnJVcCMvnOATk="
326 else "sha256-XuQZPbFWqPHlrJvllkvLl1FjKeoAUbi8oKDrS2rY1KM=";
328 nativeBuildInputs = [
331 rustPlatform.cargoSetupHook
332 rustPlatform.bindgenHook
334 disallowedReferences = [
338 cat ../.cargo/config.toml > ext/fast_mmaped_file_rs/.cargo/config.toml
339 sed -i "s|cargo-vendor-dir|$PWD/../cargo-vendor-dir|" ext/fast_mmaped_file_rs/.cargo/config.toml
342 find $out -type f -name .rustc_info.json -delete
347 nativeBuildInputs = [ pkg-config ]
348 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
349 buildInputs = [ glib libsysprof-capture pcre2 ];
353 nativeBuildInputs = [
356 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
360 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
361 propagatedBuildInputs = [
365 gobject-introspection
380 dontStrip = stdenv.hostPlatform.isDarwin;
383 gobject-introspection = attrs: {
384 nativeBuildInputs = [ pkg-config ]
385 ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
386 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 glib pcre2 libsysprof-capture ];
392 substituteInPlace bin/gollum \
393 --replace "/usr/bin/env -S ruby" "${ruby}/bin/ruby"
397 google-protobuf = attrs:
398 lib.optionalAttrs (lib.versionAtLeast attrs.version "3.25.0") {
399 # Fails on 3.25.0 with:
400 # convert.c:312:32: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
401 hardeningDisable = [ "format" ];
405 nativeBuildInputs = [ pkg-config ]
406 ++ lib.optional stdenv.hostPlatform.isDarwin cctools
407 ++ lib.optional (lib.versionAtLeast attrs.version "1.53.0" && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) autoSignDarwinBinariesHook;
408 buildInputs = [ openssl ];
409 hardeningDisable = [ "format" ];
410 env.NIX_CFLAGS_COMPILE = toString [
411 "-Wno-error=stringop-overflow"
412 "-Wno-error=implicit-fallthrough"
413 "-Wno-error=sizeof-pointer-memaccess"
414 "-Wno-error=cast-function-type"
415 "-Wno-error=class-memaccess"
416 "-Wno-error=ignored-qualifiers"
417 "-Wno-error=tautological-compare"
418 "-Wno-error=stringop-truncation"
422 substituteInPlace Makefile \
423 --replace '-Wno-invalid-source-encoding' ""
424 '' + lib.optionalString (lib.versionOlder attrs.version "1.53.0" && stdenv.hostPlatform.isDarwin) ''
426 substituteInPlace src/ruby/ext/grpc/extconf.rb \
427 --replace "ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/" ""
429 substituteInPlace src/ruby/ext/grpc/extconf.rb \
430 --replace 'apple_toolchain = ' 'apple_toolchain = false && '
435 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];
441 # Fix incompatible function pointer conversion errors with clang 16
442 ./hpricot-fix-incompatible-function-pointer-conversion.patch
448 buildFlags = lib.optionals stdenv.hostPlatform.isDarwin [
449 "--with-iconv-dir=${lib.getLib libiconv}"
450 "--with-iconv-include=${lib.getDev libiconv}/include"
453 # Fix incompatible function pointer conversion errors with clang 16
454 ./iconv-fix-incompatible-function-pointer-conversions.patch
459 buildInputs = [ libidn ];
462 # disable bundle install as it can't install anything in addition to what is
463 # specified in pkgs/applications/misc/jekyll/Gemfile anyway. Also do chmod_R
464 # to compensate for read-only files in site_template in nix store.
467 installPath=$(cat $out/nix-support/gem-meta/install-path)
468 sed -i $installPath/lib/jekyll/commands/new.rb \
469 -e 's@Exec.run("bundle", "install"@Exec.run("true"@' \
470 -e 's@FileUtils.cp_r site_template + "/.", path@FileUtils.cp_r site_template + "/.", path; FileUtils.chmod_R "u+w", path@'
474 # note that you need version >= v3.16.14.8,
475 # otherwise the gem will fail to link to the libv8 binary.
476 # see: https://github.com/cowboyd/libv8/pull/161
478 buildInputs = [ which nodejs.libv8 python2 ];
479 buildFlags = [ "--with-system-v8=true" ];
481 # The gem includes broken symlinks which are ignored during unpacking, but
482 # then fail during build. Since the content is missing anyway, touching the
483 # files is enough to unblock the build.
485 touch vendor/depot_tools/cbuildbot vendor/depot_tools/chrome_set_ver vendor/depot_tools/cros_sdk
488 substituteInPlace ext/libv8/extconf.rb \
489 --replace "location = Libv8::Location::Vendor.new" \
490 "location = Libv8::Location::System.new"
492 meta.broken = true; # At 2023-01-20, errors as:
493 # "Failed to build gem native extension."
494 # Requires Python 2. Project is abandoned.
498 propagatedBuildInputs = [ nodejs.libv8 ];
501 libxml-ruby = attrs: {
503 "--with-xml2-lib=${libxml2.out}/lib"
504 "--with-xml2-include=${libxml2.dev}/include/libxml2"
505 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
506 "--with-iconv-dir=${lib.getLib libiconv}"
507 "--with-opt-include=${lib.getDev libiconv}/include"
511 mathematical = attrs: {
512 nativeBuildInputs = [
533 # The ruby build script takes care of this
534 dontUseCmakeConfigure = true;
537 # Reduce output size by a lot, and remove some unnecessary references.
538 # The ext directory should only be required at build time, so
539 # can be deleted now.
540 rm -r $out/${ruby.gemPath}/gems/mathematical-${attrs.version}/ext \
541 $out/${ruby.gemPath}/extensions/*/*/mathematical-${attrs.version}/gem_make.out
544 # For some reason 'mathematical.so' is missing cairo, glib, and
545 # lasem in its RPATH, add them explicitly here
546 postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
547 soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so"
548 rpath="$(patchelf --print-rpath "$soPath")"
549 patchelf --set-rpath "${lib.makeLibraryPath [ lasem glib cairo ]}:$rpath" "$soPath"
550 patchelf --replace-needed liblasem.so liblasem-0.4.so "$soPath"
555 buildInputs = [ file ];
557 installPath=$(cat $out/nix-support/gem-meta/install-path)
558 sed -e 's@ENV\["MAGIC_LIB"\] ||@ENV\["MAGIC_LIB"\] || "${file}/lib/libmagic.so" ||@' -i $installPath/lib/magic/api.rb
562 maxmind_geoip2 = attrs: {
563 buildFlags = [ "--with-maxminddb-lib=${libmaxminddb}/lib" "--with-maxminddb-include=${libmaxminddb}/include" ];
566 metasploit-framework = attrs: {
573 buildInputs = [ libmysqlclient zlib openssl ];
577 buildInputs = [ libmysqlclient zlib openssl ];
581 buildInputs = [ ncurses ];
583 "--with-cflags=-I${ncurses.dev}/include"
584 "--with-ldflags=-L${ncurses.out}/lib"
590 "--use-system-libraries"
591 "--with-zlib-lib=${zlib.out}/lib"
592 "--with-zlib-include=${zlib.dev}/include"
593 "--with-xml2-lib=${libxml2.out}/lib"
594 "--with-xml2-include=${libxml2.dev}/include/libxml2"
595 "--with-xslt-lib=${libxslt.out}/lib"
596 "--with-xslt-include=${libxslt.dev}/include"
597 "--with-exslt-lib=${libxslt.out}/lib"
598 "--with-exslt-include=${libxslt.dev}/include"
599 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
600 "--with-iconv-dir=${libiconv}"
601 "--with-opt-include=${libiconv}/include"
603 } // lib.optionalAttrs stdenv.hostPlatform.isDarwin {
604 buildInputs = [ libxml2 ];
606 # libxml 2.12 upgrade requires these fixes
607 # https://github.com/sparklemotion/nokogiri/pull/3032
608 # which don't trivially apply to older versions
609 meta.broken = (lib.versionOlder attrs.version "1.16.0") && (lib.versionAtLeast libxml2.version "2.12");
613 # https://github.com/ruby/openssl/issues/369
614 buildInputs = [ (if (lib.versionAtLeast attrs.version "3.0.0") then openssl else openssl_1_1) ];
620 substituteInPlace lib/opus-ruby.rb \
621 --replace "ffi_lib 'opus'" \
622 "ffi_lib '${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}'"
626 ovirt-engine-sdk = attrs: {
627 buildInputs = [ curl libxml2 ];
629 meta.broken = stdenv.hostPlatform.isDarwin; # At least until releasing https://github.com/oVirt/ovirt-engine-sdk-ruby/pull/17
633 nativeBuildInputs = [
635 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
636 buildInputs = [ libdatrie libthai fribidi harfbuzz libsysprof-capture pcre2 xorg.libpthreadstubs xorg.libXdmcp ]
637 ++ lib.optionals stdenv.hostPlatform.isLinux [ libselinux libsepol util-linux ];
638 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook3 ];
642 buildInputs = [ curl ];
646 buildInputs = [ libpcap ];
650 # Force pkg-config lookup for libpq.
651 # See https://github.com/ged/ruby-pg/blob/6629dec6656f7ca27619e4675b45225d9e422112/ext/extconf.rb#L34-L55
653 # Note that setting --with-pg-config=${lib.getDev postgresql}/bin/pg_config would add
654 # an unnecessary reference to the entire postgresql package.
655 buildFlags = [ "--with-pg-config=ignore" ];
656 nativeBuildInputs = [ pkg-config ];
657 buildInputs = [ postgresql ];
661 buildInputs = [ libyaml ];
665 buildInputs = [ openssl ];
668 "pygments.rb" = attrs: {
669 buildInputs = [ python3 ];
673 meta.mainProgram = "rackup";
677 meta.mainProgram = "rails";
681 buildInputs = [ rainbow_rake ];
685 buildInputs = [ zeromq czmq ];
686 buildFlags = [ "--with-system-libs" ];
690 if lib.versionOlder spec.version "6.0.0" then {
692 sed -i $(cat $out/nix-support/gem-meta/install-path)/lib/rbnacl.rb -e "2a \
693 RBNACL_LIBSODIUM_GEM_LIB_PATH = '${libsodium.out}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}'
699 substituteInPlace lib/rbnacl/sodium.rb \
700 --replace 'ffi_lib ["sodium"' \
701 'ffi_lib ["${libsodium}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}"'
706 buildInputs = [ re2 ];
708 "--enable-system-libraries"
712 rest-client = attrs: {
713 meta.mainProgram = "restclient";
717 nativeBuildInputs = [ pkg-config ];
718 buildInputs = [ imagemagick which ];
722 meta.mainProgram = "rougify";
726 buildInputs = [ linux-pam ];
729 rspec-core = attrs: {
730 meta.mainProgram = "rspec";
733 ruby-libvirt = attrs: {
734 nativeBuildInputs = [ pkg-config ];
735 buildInputs = [ libvirt ];
737 "--with-libvirt-include=${libvirt}/include"
738 "--with-libvirt-lib=${libvirt}/lib"
743 buildInputs = [ lxc ];
746 ruby-terminfo = attrs: {
747 buildInputs = [ ncurses ];
749 "--with-cflags=-I${ncurses.dev}/include"
750 "--with-ldflags=-L${ncurses.out}/lib"
754 substituteInPlace extconf.rb --replace 'rubyio.h' 'ruby/io.h'
755 substituteInPlace terminfo.c \
756 --replace 'rubyio.h' 'ruby/io.h' \
757 --replace 'rb_cData' 'rb_cObject'
763 cd "$(cat $out/nix-support/gem-meta/install-path)"
765 substituteInPlace lib/vips.rb \
766 --replace 'library_name("vips", 42)' '"${lib.getLib vips}/lib/libvips${stdenv.hostPlatform.extensions.sharedLibrary}"' \
767 --replace 'library_name("glib-2.0", 0)' '"${glib.out}/lib/libglib-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"' \
768 --replace 'library_name("gobject-2.0", 0)' '"${glib.out}/lib/libgobject-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"'
773 nativeBuildInputs = [ cmake pkg-config which ] ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
774 buildInputs = [ openssl libssh2 zlib ];
775 dontUseCmakeConfigure = true;
779 nativeBuildInputs = [ rake ];
781 SASS_LIBSASS_PATH = toString libsass;
783 substituteInPlace lib/sassc/native.rb \
784 --replace 'gem_root = spec.gem_dir' 'gem_root = File.join(__dir__, "../../")'
788 sass-embedded = attrs: {
789 # Patch the Rakefile to use our dart-sass and not try to fetch anything.
792 substituteInPlace ext/sass/Rakefile \
793 --replace \'dart-sass/sass\' \'${dart-sass}/bin/sass\' \
794 --replace ' => %w[dart-sass]' ""
798 scrypt = attrs: lib.optionalAttrs stdenv.hostPlatform.isDarwin {
801 sed -i -e "s/-arch i386//" Rakefile ext/scrypt/Rakefile
806 buildInputs = [ openssl ];
810 buildInputs = [ postgresql ];
814 buildInputs = [ args.snappy ];
817 sqlite3 = attrs: if lib.versionAtLeast attrs.version "1.5.0"
819 nativeBuildInputs = [ pkg-config ];
820 buildInputs = [ sqlite ];
822 "--enable-system-libraries"
827 "--with-sqlite3-include=${sqlite.dev}/include"
828 "--with-sqlite3-lib=${sqlite.out}/lib"
832 rb-readline = attrs: {
835 substituteInPlace lib/rbreadline.rb \
836 --replace 'infocmp' '${ncurses}/bin/infocmp'
840 taglib-ruby = attrs: {
841 buildInputs = [ taglib ];
844 timfel-krb5-auth = attrs: {
845 buildInputs = [ libkrb5 ];
849 nativeBuildInputs = [ pkg-config openssl ];
850 buildInputs = [ freetds ];
854 meta.mainProgram = "tt";
858 buildInputs = [ curl ];
861 tzinfo = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
865 path = if lib.versionAtLeast attrs.version "2.0"
866 then "lib/tzinfo/data_sources/zoneinfo_data_source.rb"
867 else "lib/tzinfo/zoneinfo_data_source.rb";
870 substituteInPlace ${path} \
871 --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
876 buildInputs = [ which libossp_uuid ];
880 meta.mainProgram = "whoisrb";
883 xapian-ruby = attrs: {
884 # use the system xapian
886 nativeBuildInputs = [ rake pkg-config bundler ];
887 buildInputs = [ xapian zlib ];
889 cp ${./xapian-Rakefile} Rakefile
892 export XAPIAN_CONFIG=${xapian}/bin/xapian-config
897 buildInputs = [ zlib ];
901 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ cctools ];