albatros/hcl/nixcache/pin.sh

10 lines
235 B
Bash
Raw Normal View History

2023-03-24 13:35:43 +00:00
#!/usr/bin/env bash
set -euxo pipefail
2023-03-24 15:46:31 +00:00
set -f # disable globbing
2023-03-24 13:35:43 +00:00
2023-03-24 15:46:31 +00:00
mkdir -p /nix/var/nix/gcroots/albatros
DRV_NAME=$(echo $DRV_PATH | cut -d '/' -f 4)
GCROOT=/nix/var/nix/gcroots/albatros/$DRV_NAME
rm -f $GCROOT
ln -s $DRV_PATH $GCROOT