mirror of
https://github.com/status-im/status-react.git
synced 2025-01-09 10:42:53 +00:00
Jakub Sokołowski
1f7fd17ff1
This way the name of the repo makes at least some sense and matches the `status-desktop` repo naming. Also updated `status-jenkins-lib` since it also contained references to `status-react` repo and job names. Signed-off-by: Jakub Sokołowski <jakub@status.im>
23 lines
651 B
Bash
Executable File
23 lines
651 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -Ee
|
|
|
|
_NIX_GCROOTS="${_NIX_GCROOTS:-/nix/var/nix/gcroots/per-user/${USER}/status-mobile}"
|
|
|
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
|
source "${GIT_ROOT}/nix/scripts/source.sh"
|
|
source "${GIT_ROOT}/scripts/colors.sh"
|
|
|
|
TARGET="${1}"
|
|
shift
|
|
if [[ -z "${TARGET}" ]]; then
|
|
echo -e "${RED}No target specified for gcroots.sh!${RST}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Creates a symlink to derivation in _NIX_GCROOTS directory.
|
|
# This prevents it from being removed by 'gc-collect-garbage'.
|
|
nix-instantiate --attr "${TARGET}" \
|
|
--add-root "${_NIX_GCROOTS}/${TARGET}" \
|
|
"${@}" "${GIT_ROOT}/default.nix" >/dev/null
|