Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ runtimeShell, lib, writeScript, bundix, bundler, coreutils, git, nix }: 2 3attrPath: 4 5let 6 updateScript = writeScript "bundler-update-script" '' 7 #!${runtimeShell} 8 PATH=${lib.makeBinPath [ bundler bundix coreutils git nix ]} 9 set -o errexit 10 set -o nounset 11 set -o pipefail 12 13 attrPath=$1 14 15 toplevel=$(git rev-parse --show-toplevel) 16 position=$(nix --extra-experimental-features nix-command eval -f "$toplevel" --raw "$attrPath.meta.position") 17 gemdir=$(dirname "$position") 18 19 cd "$gemdir" 20 21 bundler lock --update 22 bundix 23 ''; 24in [ updateScript attrPath ]