nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 21.05 685 lines 20 kB view raw
1# The standard set of gems in nixpkgs including potential fixes. 2# 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). 7# { 8# name = "bundler"; 9# version = "1.6.5"; 10# sha256 = "1s4x0f5by9xs2y24jk6krq5ky7ffkzmxgr4z1nhdykdmpsi2zd0l"; 11# dependencies = [ "rake" ]; 12# } 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 15# derivations. 16# 17# This seperates "what to build" (the exact gem versions) from "how to build" 18# (to make gems behave if necessary). 19 20{ lib, fetchurl, writeScript, ruby, libkrb5, libxml2, libxslt, python, stdenv, which 21, libiconv, postgresql, v8, clang, sqlite, zlib, imagemagick, lasem 22, pkg-config , ncurses, xapian, gpgme, util-linux, tzdata, icu, libffi 23, cmake, libssh2, openssl, libmysqlclient, git, perl, pcre, gecode_3, curl 24, msgpack, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem 25, cairo, 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, wrapGAppsHook, atk 28, bundler, libsass, libselinux, libsepol, shared-mime-info, libthai, libdatrie 29, CoreServices, DarwinTools, cctools 30}@args: 31 32let 33 rainbow_rake = buildRubyGem { 34 pname = "rake"; 35 gemName = "rake"; 36 source.sha256 = "01j8fc9bqjnrsxbppncai05h43315vmz9fwg28qdsgcjw9ck1d7n"; 37 type = "gem"; 38 version = "12.0.0"; 39 }; 40in 41 42{ 43 atk = attrs: { 44 dependencies = attrs.dependencies ++ [ "gobject-introspection" ]; 45 nativeBuildInputs = [ rake bundler pkg-config ] 46 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 47 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook atk ]; 48 }; 49 50 bundler = attrs: 51 let 52 templates = "${attrs.ruby.gemPath}/gems/${attrs.gemName}-${attrs.version}/lib/bundler/templates/"; 53 in { 54 # patching shebangs would fail on the templates/Executable file, so we 55 # temporarily remove the executable flag. 56 preFixup = "chmod -x $out/${templates}/Executable"; 57 postFixup = '' 58 chmod +x $out/${templates}/Executable 59 60 # Allows to load another bundler version 61 sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle 62 ''; 63 }; 64 65 cairo = attrs: { 66 nativeBuildInputs = [ pkg-config ] 67 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 68 buildInputs = [ gtk2 pcre xorg.libpthreadstubs xorg.libXdmcp]; 69 }; 70 71 cairo-gobject = attrs: { 72 nativeBuildInputs = [ pkg-config ] 73 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 74 buildInputs = [ cairo pcre xorg.libpthreadstubs xorg.libXdmcp ]; 75 }; 76 77 charlock_holmes = attrs: { 78 buildInputs = [ which icu zlib ]; 79 }; 80 81 cld3 = attrs: { 82 nativeBuildInputs = [ pkg-config ]; 83 buildInputs = [ protobuf ]; 84 }; 85 86 cocoapods-acknowledgements = attrs: { 87 dependencies = attrs.dependencies ++ [ "cocoapods" ]; 88 }; 89 90 cocoapods-deploy = attrs: { 91 dependencies = [ "cocoapods" ]; 92 }; 93 94 cocoapods-disable-podfile-validations = attrs: { 95 dependencies = [ "cocoapods" ]; 96 }; 97 98 cocoapods-generate = attrs: { 99 dependencies = attrs.dependencies ++ [ "cocoapods" ]; 100 }; 101 102 cocoapods-git_url_rewriter = attrs: { 103 dependencies = [ "cocoapods" ]; 104 }; 105 106 cocoapods-keys = attrs: { 107 dependencies = attrs.dependencies ++ [ "cocoapods" ]; 108 }; 109 110 cocoapods-open = attrs: { 111 dependencies = [ "cocoapods" ]; 112 }; 113 114 cocoapods-try-release-fix = attrs: { 115 dependencies = [ "cocoapods" ]; 116 }; 117 118 curb = attrs: { 119 buildInputs = [ curl ]; 120 }; 121 122 curses = attrs: { 123 buildInputs = [ ncurses ]; 124 }; 125 126 dep-selector-libgecode = attrs: { 127 USE_SYSTEM_GECODE = true; 128 postInstall = '' 129 installPath=$(cat $out/nix-support/gem-meta/install-path) 130 sed -i $installPath/lib/dep-selector-libgecode.rb -e 's@VENDORED_GECODE_DIR =.*@VENDORED_GECODE_DIR = "${gecode_3}"@' 131 ''; 132 }; 133 134 digest-sha3 = attrs: { 135 hardeningDisable = [ "format" ]; 136 }; 137 138 ethon = attrs: { 139 dontBuild = false; 140 postPatch = '' 141 substituteInPlace lib/ethon/curls/settings.rb \ 142 --replace "libcurl" "${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary}" 143 ''; 144 }; 145 146 fog-dnsimple = attrs: 147 lib.optionalAttrs (lib.versionOlder attrs.version "1.0.1") { 148 postInstall = '' 149 cd $(cat $out/nix-support/gem-meta/install-path) 150 rm {$out/bin,bin,../../bin}/{setup,console} 151 ''; 152 }; 153 154 redis-rack = attrs: { 155 dontBuild = false; 156 preBuild = '' 157 exec 3>&1 158 output="$(gem build $gemspec | tee >(cat - >&3))" 159 exec 3>&- 160 sed -i 's!"rake".freeze!!' $gemspec 161 ''; 162 }; 163 164 ffi-rzmq-core = attrs: { 165 postInstall = '' 166 installPath=$(cat $out/nix-support/gem-meta/install-path) 167 sed -i $installPath/lib/ffi-rzmq-core/libzmq.rb -e 's@inside_gem =.*@inside_gem = "${zeromq}/lib"@' 168 ''; 169 }; 170 171 mimemagic = attrs: { 172 FREEDESKTOP_MIME_TYPES_PATH = "${shared-mime-info}/share/mime/packages/freedesktop.org.xml"; 173 }; 174 175 mini_magick = attrs: { 176 postInstall = '' 177 installPath=$(cat $out/nix-support/gem-meta/install-path) 178 echo -e "\nENV['PATH'] += ':${graphicsmagick}/bin'\n" >> $installPath/lib/mini_magick/configuration.rb 179 ''; 180 }; 181 182 do_sqlite3 = attrs: { 183 buildInputs = [ sqlite ]; 184 }; 185 186 eventmachine = attrs: { 187 buildInputs = [ openssl ]; 188 }; 189 190 ffi = attrs: { 191 nativeBuildInputs = [ pkg-config ]; 192 buildInputs = [ libffi ]; 193 }; 194 195 gdk_pixbuf2 = attrs: { 196 nativeBuildInputs = [ pkg-config bundler rake ] 197 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 198 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gdk-pixbuf ]; 199 }; 200 201 gpgme = attrs: { 202 buildInputs = [ gpgme ]; 203 buildFlags = [ "--use-system-libraries" ]; 204 }; 205 206 gio2 = attrs: { 207 nativeBuildInputs = [ pkg-config ] 208 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 209 buildInputs = [ gtk2 pcre gobject-introspection ] ++ lib.optionals stdenv.isLinux [ util-linux libselinux libsepol ]; 210 }; 211 212 gitlab-markup = attrs: { meta.priority = 1; }; 213 214 gitlab-pg_query = attrs: lib.optionalAttrs (attrs.version == "1.3.1") { 215 dontBuild = false; 216 postPatch = '' 217 sed -i "s;'https://codeload.github.com.*';'${fetchurl { 218 url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.3"; 219 sha256 = "0jfij8apzxsdabl70j42xgd5f3ka1gdcrk764nccp66164gpcchk"; 220 }}';" ext/pg_query/extconf.rb 221 ''; 222 }; 223 224 pg_query = attrs: lib.optionalAttrs (attrs.version == "2.0.2") { 225 dontBuild = false; 226 postPatch = '' 227 sed -i "s;'https://codeload.github.com.*';'${fetchurl { 228 url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/13-2.0.2"; 229 sha256 = "0ms2s6hmy8qyzv4g1hj4i2p5fws1v8lrj73b2knwbp2ipd45yj7y"; 230 }}';" ext/pg_query/extconf.rb 231 ''; 232 } // lib.optionalAttrs (attrs.version == "1.3.0") { 233 # Needed for gitlab 234 dontBuild = false; 235 postPatch = '' 236 sed -i "s;'https://codeload.github.com.*';'${fetchurl { 237 url = "https://codeload.github.com/lfittl/libpg_query/tar.gz/10-1.0.4"; 238 sha256 = "0f0kshhai0pnkqj0w4kgz3fssnvwidllc31n1fysxjjzdqlr1k48"; 239 }}';" ext/pg_query/extconf.rb 240 ''; 241 }; 242 243 glib2 = attrs: { 244 nativeBuildInputs = [ pkg-config ] 245 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 246 buildInputs = [ gtk2 pcre ]; 247 }; 248 249 gtk2 = attrs: { 250 nativeBuildInputs = [ 251 binutils pkg-config 252 ] ++ lib.optionals stdenv.isLinux [ 253 util-linux libselinux libsepol 254 ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 255 propagatedBuildInputs = [ 256 atk 257 gdk-pixbuf 258 fribidi 259 gobject-introspection 260 gtk2 261 harfbuzz 262 libdatrie 263 libthai 264 pcre 265 xorg.libpthreadstubs 266 xorg.libXdmcp 267 ]; 268 dontStrip = stdenv.isDarwin; 269 }; 270 271 gobject-introspection = attrs: { 272 nativeBuildInputs = [ pkg-config pcre ] 273 ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 274 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook glib ]; 275 }; 276 277 grpc = attrs: { 278 nativeBuildInputs = [ pkg-config ]; 279 buildInputs = [ openssl ]; 280 hardeningDisable = [ "format" ]; 281 NIX_CFLAGS_COMPILE = toString [ 282 "-Wno-error=stringop-overflow" 283 "-Wno-error=implicit-fallthrough" 284 "-Wno-error=sizeof-pointer-memaccess" 285 "-Wno-error=cast-function-type" 286 "-Wno-error=class-memaccess" 287 "-Wno-error=ignored-qualifiers" 288 "-Wno-error=tautological-compare" 289 "-Wno-error=stringop-truncation" 290 ]; 291 dontBuild = false; 292 postPatch = '' 293 substituteInPlace Makefile \ 294 --replace '-Wno-invalid-source-encoding' "" 295 ''; 296 }; 297 298 hitimes = attrs: { 299 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; 300 }; 301 302 iconv = attrs: { 303 buildFlags = lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}"; 304 }; 305 306 idn-ruby = attrs: { 307 buildInputs = [ libidn ]; 308 }; 309 310 # disable bundle install as it can't install anything in addition to what is 311 # specified in pkgs/applications/misc/jekyll/Gemfile anyway. Also do chmod_R 312 # to compensate for read-only files in site_template in nix store. 313 jekyll = attrs: { 314 postInstall = '' 315 installPath=$(cat $out/nix-support/gem-meta/install-path) 316 sed -i $installPath/lib/jekyll/commands/new.rb \ 317 -e 's@Exec.run("bundle", "install"@Exec.run("true"@' \ 318 -e 's@FileUtils.cp_r site_template + "/.", path@FileUtils.cp_r site_template + "/.", path; FileUtils.chmod_R "u+w", path@' 319 ''; 320 }; 321 322 # note that you need version >= v3.16.14.8, 323 # otherwise the gem will fail to link to the libv8 binary. 324 # see: https://github.com/cowboyd/libv8/pull/161 325 libv8 = attrs: { 326 buildInputs = [ which v8 python ]; 327 buildFlags = [ "--with-system-v8=true" ]; 328 dontBuild = false; 329 postPatch = '' 330 substituteInPlace ext/libv8/extconf.rb \ 331 --replace "location = Libv8::Location::Vendor.new" \ 332 "location = Libv8::Location::System.new" 333 ''; 334 }; 335 336 execjs = attrs: { 337 propagatedBuildInputs = [ v8 ]; 338 }; 339 340 libxml-ruby = attrs: { 341 buildFlags = [ 342 "--with-xml2-lib=${libxml2.out}/lib" 343 "--with-xml2-include=${libxml2.dev}/include/libxml2" 344 ]; 345 }; 346 347 mathematical = attrs: { 348 nativeBuildInputs = [ 349 ruby 350 cmake 351 bison 352 flex 353 pkg-config 354 python3 355 patchelf 356 ]; 357 358 buildInputs = [ 359 cairo 360 fribidi 361 gdk-pixbuf 362 glib 363 libxml2 364 pango 365 ]; 366 367 strictDeps = true; 368 369 # The ruby build script takes care of this 370 dontUseCmakeConfigure = true; 371 372 postInstall = '' 373 # Reduce output size by a lot, and remove some unnecessary references. 374 # The ext directory should only be required at build time, so 375 # can be deleted now. 376 rm -r $out/${ruby.gemPath}/gems/mathematical-${attrs.version}/ext \ 377 $out/${ruby.gemPath}/extensions/*/*/mathematical-${attrs.version}/gem_make.out 378 ''; 379 380 # For some reason 'mathematical.so' is missing cairo, glib, and 381 # lasem in its RPATH, add them explicitly here 382 postFixup = lib.optionalString stdenv.isLinux '' 383 soPath="$out/${ruby.gemPath}/gems/mathematical-${attrs.version}/lib/mathematical/mathematical.so" 384 rpath="$(patchelf --print-rpath "$soPath")" 385 patchelf --set-rpath "${lib.makeLibraryPath [ lasem glib cairo ]}:$rpath" "$soPath" 386 patchelf --replace-needed liblasem.so liblasem-0.4.so "$soPath" 387 ''; 388 }; 389 390 magic = attrs: { 391 buildInputs = [ file ]; 392 postInstall = '' 393 installPath=$(cat $out/nix-support/gem-meta/install-path) 394 sed -e 's@ENV\["MAGIC_LIB"\] ||@ENV\["MAGIC_LIB"\] || "${file}/lib/libmagic.so" ||@' -i $installPath/lib/magic/api.rb 395 ''; 396 }; 397 398 metasploit-framework = attrs: { 399 preInstall = '' 400 export HOME=$TMPDIR 401 ''; 402 }; 403 404 msgpack = attrs: { 405 buildInputs = [ msgpack ]; 406 }; 407 408 mysql = attrs: { 409 buildInputs = [ libmysqlclient zlib openssl ]; 410 }; 411 412 mysql2 = attrs: { 413 buildInputs = [ libmysqlclient zlib openssl ]; 414 }; 415 416 ncursesw = attrs: { 417 buildInputs = [ ncurses ]; 418 buildFlags = [ 419 "--with-cflags=-I${ncurses.dev}/include" 420 "--with-ldflags=-L${ncurses.out}/lib" 421 ]; 422 }; 423 424 nokogiri = attrs: { 425 buildFlags = [ 426 "--use-system-libraries" 427 "--with-zlib-lib=${zlib.out}/lib" 428 "--with-zlib-include=${zlib.dev}/include" 429 "--with-xml2-lib=${libxml2.out}/lib" 430 "--with-xml2-include=${libxml2.dev}/include/libxml2" 431 "--with-xslt-lib=${libxslt.out}/lib" 432 "--with-xslt-include=${libxslt.dev}/include" 433 "--with-exslt-lib=${libxslt.out}/lib" 434 "--with-exslt-include=${libxslt.dev}/include" 435 ] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}"; 436 }; 437 438 openssl = attrs: { 439 buildInputs = [ openssl ]; 440 }; 441 442 opus-ruby = attrs: { 443 dontBuild = false; 444 postPatch = '' 445 substituteInPlace lib/opus-ruby.rb \ 446 --replace "ffi_lib 'opus'" \ 447 "ffi_lib '${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}'" 448 ''; 449 }; 450 451 ovirt-engine-sdk = attrs: { 452 buildInputs = [ curl libxml2 ]; 453 }; 454 455 pango = attrs: { 456 nativeBuildInputs = [ 457 pkg-config 458 fribidi 459 harfbuzz 460 pcre 461 xorg.libpthreadstubs 462 xorg.libXdmcp 463 ] ++ lib.optionals stdenv.isDarwin [ DarwinTools ]; 464 buildInputs = [ libdatrie libthai ] 465 ++ lib.optionals stdenv.isLinux [ libselinux libsepol util-linux ]; 466 propagatedBuildInputs = [ gobject-introspection wrapGAppsHook gtk2 ]; 467 }; 468 469 patron = attrs: { 470 buildInputs = [ curl ]; 471 }; 472 473 pcaprub = attrs: { 474 buildInputs = [ libpcap ]; 475 }; 476 477 pg = attrs: { 478 buildFlags = [ 479 "--with-pg-config=${postgresql}/bin/pg_config" 480 ]; 481 }; 482 483 puma = attrs: { 484 buildInputs = [ openssl ]; 485 }; 486 487 rainbow = attrs: { 488 buildInputs = [ rainbow_rake ]; 489 }; 490 491 rbczmq = { ... }: { 492 buildInputs = [ zeromq czmq ]; 493 buildFlags = [ "--with-system-libs" ]; 494 }; 495 496 rbnacl = spec: 497 if lib.versionOlder spec.version "6.0.0" then { 498 postInstall = '' 499 sed -i $(cat $out/nix-support/gem-meta/install-path)/lib/rbnacl.rb -e "2a \ 500 RBNACL_LIBSODIUM_GEM_LIB_PATH = '${libsodium.out}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}' 501 " 502 ''; 503 } else { 504 dontBuild = false; 505 postPatch = '' 506 substituteInPlace lib/rbnacl/sodium.rb \ 507 --replace 'ffi_lib ["sodium"' \ 508 'ffi_lib ["${libsodium}/lib/libsodium${stdenv.hostPlatform.extensions.sharedLibrary}"' 509 ''; 510 }; 511 512 re2 = attrs: { 513 buildInputs = [ re2 ]; 514 }; 515 516 rmagick = attrs: { 517 nativeBuildInputs = [ pkg-config ]; 518 buildInputs = [ imagemagick which ]; 519 }; 520 521 rpam2 = attrs: { 522 buildInputs = [ linux-pam ]; 523 }; 524 525 ruby-libvirt = attrs: { 526 buildInputs = [ libvirt pkg-config ]; 527 buildFlags = [ 528 "--with-libvirt-include=${libvirt}/include" 529 "--with-libvirt-lib=${libvirt}/lib" 530 ]; 531 dontBuild = false; 532 postPatch = '' 533 # https://gitlab.com/libvirt/libvirt-ruby/-/commit/43543991832c9623c00395092bcfb9e178243ba4 534 substituteInPlace ext/libvirt/common.c \ 535 --replace 'st.h' 'ruby/st.h' 536 substituteInPlace ext/libvirt/domain.c \ 537 --replace 'st.h' 'ruby/st.h' 538 ''; 539 }; 540 541 ruby-lxc = attrs: { 542 buildInputs = [ lxc ]; 543 }; 544 545 ruby-terminfo = attrs: { 546 buildInputs = [ ncurses ]; 547 buildFlags = [ 548 "--with-cflags=-I${ncurses.dev}/include" 549 "--with-ldflags=-L${ncurses.out}/lib" 550 ]; 551 }; 552 553 ruby-vips = attrs: { 554 postInstall = '' 555 cd "$(cat $out/nix-support/gem-meta/install-path)" 556 557 substituteInPlace lib/vips.rb \ 558 --replace 'library_name("vips", 42)' '"${lib.getLib vips}/lib/libvips${stdenv.hostPlatform.extensions.sharedLibrary}"' \ 559 --replace 'library_name("glib-2.0", 0)' '"${glib.out}/lib/libglib-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"' \ 560 --replace 'library_name("gobject-2.0", 0)' '"${glib.out}/lib/libgobject-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"' 561 ''; 562 }; 563 564 rugged = attrs: { 565 nativeBuildInputs = [ cmake pkg-config which ]; 566 buildInputs = [ openssl libssh2 zlib ]; 567 dontUseCmakeConfigure = true; 568 }; 569 570 sassc = attrs: { 571 nativeBuildInputs = [ rake ]; 572 dontBuild = false; 573 SASS_LIBSASS_PATH = toString libsass; 574 postPatch = '' 575 substituteInPlace lib/sassc/native.rb \ 576 --replace 'gem_root = spec.gem_dir' 'gem_root = File.join(__dir__, "../../")' 577 ''; 578 } // (lib.optionalAttrs stdenv.isDarwin { 579 # https://github.com/NixOS/nixpkgs/issues/19098 580 buildFlags = [ "--disable-lto" ]; 581 }); 582 583 scrypt = attrs: lib.optionalAttrs stdenv.isDarwin { 584 dontBuild = false; 585 postPatch = '' 586 sed -i -e "s/-arch i386//" Rakefile ext/scrypt/Rakefile 587 ''; 588 }; 589 590 semian = attrs: { 591 buildInputs = [ openssl ]; 592 }; 593 594 sequel_pg = attrs: { 595 buildInputs = [ postgresql ]; 596 }; 597 598 snappy = attrs: { 599 buildInputs = [ args.snappy ]; 600 }; 601 602 sqlite3 = attrs: { 603 buildFlags = [ 604 "--with-sqlite3-include=${sqlite.dev}/include" 605 "--with-sqlite3-lib=${sqlite.out}/lib" 606 ]; 607 }; 608 609 rb-readline = attrs: { 610 dontBuild = false; 611 postPatch = '' 612 substituteInPlace lib/rbreadline.rb \ 613 --replace 'infocmp' '${ncurses}/bin/infocmp' 614 ''; 615 }; 616 617 taglib-ruby = attrs: { 618 buildInputs = [ taglib ]; 619 }; 620 621 thrift = attrs: { 622 # See: https://stackoverflow.com/questions/36378190/cant-install-thrift-gem-on-os-x-el-capitan/36523125#36523125 623 # Note that thrift-0.8.0 is a dependency of fluent-plugin-scribe which is a dependency of fluentd. 624 buildFlags = lib.optional (stdenv.isDarwin && lib.versionOlder attrs.version "0.9.2.0") 625 "--with-cppflags=\"-D_FORTIFY_SOURCE=0 -Wno-macro-redefined -Wno-shift-negative-value\""; 626 }; 627 628 timfel-krb5-auth = attrs: { 629 buildInputs = [ libkrb5 ]; 630 }; 631 632 tiny_tds = attrs: { 633 nativeBuildInputs = [ pkg-config openssl ]; 634 buildInputs = [ freetds ]; 635 }; 636 637 typhoeus = attrs: { 638 buildInputs = [ curl ]; 639 }; 640 641 tzinfo = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") { 642 dontBuild = false; 643 postPatch = 644 let 645 path = if lib.versionAtLeast attrs.version "2.0" 646 then "lib/tzinfo/data_sources/zoneinfo_data_source.rb" 647 else "lib/tzinfo/zoneinfo_data_source.rb"; 648 in 649 '' 650 substituteInPlace ${path} \ 651 --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo" 652 ''; 653 }; 654 655 uuid4r = attrs: { 656 buildInputs = [ which libossp_uuid ]; 657 }; 658 659 xapian-ruby = attrs: { 660 # use the system xapian 661 dontBuild = false; 662 nativeBuildInputs = [ rake pkg-config bundler ]; 663 buildInputs = [ xapian zlib ]; 664 postPatch = '' 665 cp ${./xapian-Rakefile} Rakefile 666 ''; 667 preInstall = '' 668 export XAPIAN_CONFIG=${xapian}/bin/xapian-config 669 ''; 670 }; 671 672 zlib = attrs: { 673 buildInputs = [ zlib ]; 674 }; 675 676 zookeeper = attrs: { 677 buildInputs = lib.optionals stdenv.isDarwin [ cctools ]; 678 dontBuild = false; 679 postPatch = '' 680 sed -i ext/extconf.rb -e "4a \ 681 FileUtils.cp '${./zookeeper-ftbfs-with-gcc-8.patch}', 'patches/zkc-3.4.5-gcc-8.patch' 682 " 683 ''; 684 }; 685}