bundlerUpdateScript
pkgs.bundlerUpdateScript
Functor
Docs pulled from | This Revision | 31 minutes ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
attrPath:
let
updateScript = writeScript "bundler-update-script" ''
#!${runtimeShell}
PATH=${
lib.makeBinPath [
bundler
bundix
coreutils
git
nix
nixfmt
]
}
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"
rm -f gemset.nix Gemfile.lock
export BUNDLE_FORCE_RUBY_PLATFORM=1
bundler lock --update
bundix
nixfmt gemset.nix
'';
in
[
updateScript
attrPath
]