6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
32 lines
1,005 B
Nix
32 lines
1,005 B
Nix
{ lib, buildRubyGem, ruby, writeScript }:
|
|
|
|
buildRubyGem rec {
|
|
inherit ruby;
|
|
name = "${gemName}-${version}";
|
|
gemName = "bundler";
|
|
version = "2.4.3";
|
|
source.sha256 = "sha256-AfX4PydFNdghhYk3cApKLxtTw8L8sLEvU3Y49nKHxwA=";
|
|
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";
|
|
changelog = "https://github.com/rubygems/rubygems/blob/bundler-v${version}/bundler/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [anthonyroussel];
|
|
};
|
|
}
|