status-react/scripts/add-gcroots.sh
Pedro Pombeiro 90d517adf6
nix: Add add-gcroots target to Makefile to avoid garbage collection
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-05-13 11:33:00 +02:00

11 lines
255 B
Bash
Executable File

#!/usr/bin/env bash
GIT_ROOT=$(git rev-parse --show-toplevel)
rm -rf .nix-gcroots
mkdir .nix-gcroots
drv=$(nix-instantiate shell.nix)
refs=$(nix-store --query --references $drv)
nix-store -r $refs --indirect --add-root $GIT_ROOT/.nix-gcroots/shell.dep