2
0
mirror of https://github.com/status-im/status-mobile.git synced 2025-01-18 12:41:37 +00:00
Jakub Sokołowski 7517f5235a
use nix shell for nix-update-* targets
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-07-30 14:11:02 -04:00

18 lines
430 B
Bash
Executable File

#!/usr/bin/env bash
if [[ -z "${IN_NIX_SHELL}" ]]; then
echo "Remember to call 'make shell'!"
exit 1
fi
set -Eeu
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
rm -rf .nix-gcroots
mkdir .nix-gcroots
drv=$(nix-instantiate --argstr target-os all --add-root ${GIT_ROOT}/shell.nix)
refs=$(nix-store --query --references $drv)
nix-store -r $refs --indirect --add-root $GIT_ROOT/.nix-gcroots/shell.dep