electron_32: fix log spam when building on aarch64-linux (#378988)
[NixPkgs.git] / pkgs / by-name / bu / bundler / package.nix
blobd6fdf014474d9fb2fc9dbbd01e9d5612a8702ff7
2   lib,
3   buildRubyGem,
4   ruby,
5   writeScript,
6   testers,
7   bundler,
8 }:
10 buildRubyGem rec {
11   inherit ruby;
12   name = "${gemName}-${version}";
13   gemName = "bundler";
14   version = "2.5.22";
15   source.sha256 = "sha256-dj8w1ZjuWHQu6ikoWHVDXqciIY1N8UneNbzjfALOlo4=";
16   dontPatchShebangs = true;
18   postFixup = ''
19     sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
20   '';
22   passthru = {
23     updateScript = writeScript "gem-update-script" ''
24       #!/usr/bin/env nix-shell
25       #!nix-shell -i bash -p curl common-updater-scripts jq
27       set -eu -o pipefail
29       latest_version=$(curl -s https://rubygems.org/api/v1/gems/${gemName}.json | jq --raw-output .version)
30       update-source-version ${gemName} "$latest_version"
31     '';
32     tests.version = testers.testVersion {
33       package = bundler;
34       command = "bundler -v";
35       version = version;
36     };
37   };
39   meta = with lib; {
40     description = "Manage your Ruby application's gem dependencies";
41     homepage = "https://bundler.io";
42     changelog = "https://github.com/rubygems/rubygems/blob/bundler-v${version}/bundler/CHANGELOG.md";
43     license = licenses.mit;
44     maintainers = with maintainers; [ anthonyroussel ];
45     mainProgram = "bundler";
46   };