mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 14:45:27 +00:00
e62118a3f9
Blocking updates on security warnings doesn't make sense; if an updated gem has dependencies with security warnings, then it's likely for the un-updated gem to have even more of them.
25 lines
594 B
Nix
25 lines
594 B
Nix
{ runtimeShell, lib, writeScript, bundix, bundler, coreutils, git, nix }:
|
|
|
|
attrPath:
|
|
|
|
let
|
|
updateScript = writeScript "bundler-update-script" ''
|
|
#!${runtimeShell}
|
|
PATH=${lib.makeBinPath [ bundler 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
|
|
bundix
|
|
'';
|
|
in [ updateScript attrPath ]
|