depot/third_party/nixpkgs/pkgs/development/ruby-modules/bundler/default.nix
Default email 5083ee08a2 Project import generated by Copybara.
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
2022-09-30 06:47:45 -05:00

31 lines
904 B
Nix

{ lib, buildRubyGem, ruby, writeScript }:
buildRubyGem rec {
inherit ruby;
name = "${gemName}-${version}";
gemName = "bundler";
version = "2.3.22";
source.sha256 = "sha256-vOfZB6poOsiYPULaGhUXD9aSxlBGeK2ghF70ouz0IJ4=";
dontPatchShebangs = true;
passthru.updateScript = writeScript "gem-update-script" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -eu -o pipefail
latest_version=$(curl -s https://rubygems.org/api/v1/gems/${gemName}.json | jq --raw-output .version)
update-source-version ${gemName} "$latest_version"
'';
postFixup = ''
sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
'';
meta = with lib; {
description = "Manage your Ruby application's gem dependencies";
homepage = "https://bundler.io";
license = licenses.mit;
maintainers = with maintainers; [anthonyroussel];
};
}