2022-09-30 11:47:45 +00:00
|
|
|
{ lib, buildRubyGem, ruby, writeScript }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildRubyGem rec {
|
|
|
|
inherit ruby;
|
|
|
|
name = "${gemName}-${version}";
|
|
|
|
gemName = "bundler";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.3.25";
|
|
|
|
source.sha256 = "sha256-/YHsRjXEGJtm/QeJU31cs4s4ELcHZfbh6C3aFbl1ka0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
dontPatchShebangs = true;
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
|
|
|
|
'';
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Manage your Ruby application's gem dependencies";
|
|
|
|
homepage = "https://bundler.io";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [anthonyroussel];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|