a66bca1520
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
25 lines
656 B
Nix
25 lines
656 B
Nix
{ runtimeShell, lib, writeScript, bundix, bundler, bundler-audit, coreutils, git, nix }:
|
|
|
|
attrPath:
|
|
|
|
let
|
|
updateScript = writeScript "bundler-update-script" ''
|
|
#!${runtimeShell}
|
|
PATH=${lib.makeBinPath [ bundler bundler-audit bundix coreutils git nix ]}
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
attrPath=$1
|
|
|
|
toplevel=$(git rev-parse --show-toplevel)
|
|
position=$(nix --extra-experimental-features nix-command eval -f "$toplevel" --raw "$attrPath.meta.position")
|
|
gemdir=$(dirname "$position")
|
|
|
|
cd "$gemdir"
|
|
|
|
bundler lock --update
|
|
bundler-audit check --update
|
|
bundix
|
|
'';
|
|
in [ updateScript attrPath ]
|