Skip to content

Commit

Permalink
bundler: 2.5.22 -> 2.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
liberodark committed Feb 14, 2025
1 parent e57ede4 commit 9ce24a7
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions pkgs/by-name/bu/bundler/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,38 @@
lib,
buildRubyGem,
ruby,
writeScript,
testers,
bundler,
versionCheckHook,
nix-update-script,
}:

buildRubyGem rec {
inherit ruby;
name = "${gemName}-${version}";
gemName = "bundler";
version = "2.5.22";
source.sha256 = "sha256-dj8w1ZjuWHQu6ikoWHVDXqciIY1N8UneNbzjfALOlo4=";
version = "2.6.2";
source.sha256 = "sha256-S4l1bhsFOQ/2eEkRGaEPCXOiBFzJ/LInsCqTlrKPfXQ=";
dontPatchShebangs = true;

postFixup = ''
sed -i -e "s/activate_bin_path/bin_path/g" $out/bin/bundle
substituteInPlace $out/bin/bundle --replace-fail "activate_bin_path" "bin_path"
'';

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
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];

latest_version=$(curl -s https://rubygems.org/api/v1/gems/${gemName}.json | jq --raw-output .version)
update-source-version ${gemName} "$latest_version"
'';
tests.version = testers.testVersion {
package = bundler;
command = "bundler -v";
version = version;
};
passthru = {
updateScript = nix-update-script { };
};

meta = with lib; {
meta = {
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 ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ anthonyroussel ];
mainProgram = "bundler";
};
}

0 comments on commit 9ce24a7

Please sign in to comment.