Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildRubyGem, ruby, writeScript, testers, bundler }: 2 3buildRubyGem rec { 4 inherit ruby; 5 name = "${gemName}-${version}"; 6 gemName = "bundler"; 7 version = "2.4.13"; 8 source.sha256 = "sha256-EWU6pa5QfG29Vb9+m+iSbZmvrJtsDAjToZOK/rPnWos="; 9 dontPatchShebangs = true; 10 11 postFixup = '' 12 sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle 13 ''; 14 15 passthru = { 16 updateScript = writeScript "gem-update-script" '' 17 #!/usr/bin/env nix-shell 18 #!nix-shell -i bash -p curl common-updater-scripts jq 19 20 set -eu -o pipefail 21 22 latest_version=$(curl -s https://rubygems.org/api/v1/gems/${gemName}.json | jq --raw-output .version) 23 update-source-version ${gemName} "$latest_version" 24 ''; 25 tests.version = testers.testVersion { 26 package = bundler; 27 command = "bundler -v"; 28 version = version; 29 }; 30 }; 31 32 meta = with lib; { 33 description = "Manage your Ruby application's gem dependencies"; 34 homepage = "https://bundler.io"; 35 changelog = "https://github.com/rubygems/rubygems/blob/bundler-v${version}/bundler/CHANGELOG.md"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ anthonyroussel ]; 38 mainProgram = "bundler"; 39 }; 40}