2019-05-10 13:20:40 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-07-26 14:51:06 +00:00
|
|
|
set -Eeu
|
2019-06-04 16:50:29 +00:00
|
|
|
|
2020-02-19 13:15:28 +00:00
|
|
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
|
|
|
source "${GIT_ROOT}/nix/scripts/source.sh"
|
|
|
|
|
2019-06-04 17:00:19 +00:00
|
|
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
2019-05-10 13:20:40 +00:00
|
|
|
|
|
|
|
rm -rf .nix-gcroots
|
|
|
|
mkdir .nix-gcroots
|
|
|
|
|
2019-11-29 10:20:08 +00:00
|
|
|
drv=$(nix-instantiate --argstr target all --add-root ${GIT_ROOT}/shell.nix)
|
2019-05-10 13:20:40 +00:00
|
|
|
refs=$(nix-store --query --references $drv)
|
|
|
|
nix-store -r $refs --indirect --add-root $GIT_ROOT/.nix-gcroots/shell.dep
|