nix: add missing args to gcroots.sh script

This should fix the following error showing up on MacOS:
```
error: assertion ((__lessThan  0)  ((builtins).stringLength  watchmanSockPath))
failed at /Users/jenkins/repos/status-react/nix/mobile/android/watchman.nix:8:9
```
Which was caused by flags like `--argstr` not being passed.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-08-06 14:08:36 +02:00
parent f904d7b543
commit 68722340c9
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 4 additions and 3 deletions

View File

@ -55,7 +55,7 @@ nixOpts=(
) )
# Save derivation from being garbage collected # Save derivation from being garbage collected
${GIT_ROOT}/nix/scripts/gcroots.sh "${TARGET}" ${GIT_ROOT}/nix/scripts/gcroots.sh "${TARGET}" "${@}"
# Run the actual build # Run the actual build
echo "Running: nix-build "${nixOpts[@]}" "${@}" default.nix" echo "Running: nix-build "${nixOpts[@]}" "${@}" default.nix"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -Eeu set -Ee
_NIX_GCROOTS="${_NIX_GCROOTS:-/nix/var/nix/gcroots/per-user/${USER}/status-react}" _NIX_GCROOTS="${_NIX_GCROOTS:-/nix/var/nix/gcroots/per-user/${USER}/status-react}"
@ -9,6 +9,7 @@ source "${GIT_ROOT}/nix/scripts/source.sh"
source "${GIT_ROOT}/scripts/colors.sh" source "${GIT_ROOT}/scripts/colors.sh"
TARGET="${1}" TARGET="${1}"
shift
if [[ -z "${TARGET}" ]]; then if [[ -z "${TARGET}" ]]; then
echo -e "${RED}No target specified for gcroots.sh!${RST}" >&2 echo -e "${RED}No target specified for gcroots.sh!${RST}" >&2
exit 1 exit 1
@ -18,4 +19,4 @@ fi
# This prevents it from being removed by 'gc-collect-garbage'. # This prevents it from being removed by 'gc-collect-garbage'.
nix-instantiate --attr "${TARGET}" \ nix-instantiate --attr "${TARGET}" \
--add-root "${_NIX_GCROOTS}/${TARGET}" \ --add-root "${_NIX_GCROOTS}/${TARGET}" \
"${GIT_ROOT}/default.nix" >/dev/null "${@}" "${GIT_ROOT}/default.nix" >/dev/null