add Nix derivation workaround (#91)
This commit is contained in:
parent
44f94c3a05
commit
4afb052662
|
@ -1,14 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# used in Travis CI and AppVeyor scripts
|
# Copyright (c) 2018-2024 Status Research & Development GmbH. Licensed under
|
||||||
|
|
||||||
# Copyright (c) 2018-2020 Status Research & Development GmbH. Licensed under
|
|
||||||
# either of:
|
# either of:
|
||||||
# - Apache License, version 2.0
|
# - Apache License, version 2.0
|
||||||
# - MIT license
|
# - MIT license
|
||||||
# at your option. This file may not be copied, modified, or distributed except
|
# at your option. This file may not be copied, modified, or distributed except
|
||||||
# according to those terms.
|
# according to those terms.
|
||||||
|
|
||||||
set -e
|
set -eo pipefail
|
||||||
|
|
||||||
# NIM_COMMIT could be a (partial) commit hash, a tag, a branch name, etc. Empty by default.
|
# NIM_COMMIT could be a (partial) commit hash, a tag, a branch name, etc. Empty by default.
|
||||||
NIM_COMMIT_HASH="" # full hash for NIM_COMMIT, retrieved in "nim_needs_rebuilding()"
|
NIM_COMMIT_HASH="" # full hash for NIM_COMMIT, retrieved in "nim_needs_rebuilding()"
|
||||||
|
@ -121,7 +119,14 @@ build_nim() {
|
||||||
# Otherwise, when updating from pre-v2.0.10 to v2.0.10 or later,
|
# Otherwise, when updating from pre-v2.0.10 to v2.0.10 or later,
|
||||||
# https://github.com/nim-lang/Nim/issues/24173 occurs. Simulates
|
# https://github.com/nim-lang/Nim/issues/24173 occurs. Simulates
|
||||||
# https://github.com/nim-lang/Nim/pull/24189 as a workaround.
|
# https://github.com/nim-lang/Nim/pull/24189 as a workaround.
|
||||||
|
#
|
||||||
|
# When building Nimbus from a Nix derivation which adds this as part of
|
||||||
|
# a preBuild phase, do not use this hack, because it's both unnecessary
|
||||||
|
# and prevents Nim from building.
|
||||||
|
NIX_BUILD_TOP="${NIX_BUILD_TOP:-}"
|
||||||
|
if [[ "${NIX_BUILD_TOP}" != "/build" ]]; then
|
||||||
rm -rf dist/checksums
|
rm -rf dist/checksums
|
||||||
|
fi
|
||||||
|
|
||||||
if grep -q skipIntegrityCheck koch.nim; then
|
if grep -q skipIntegrityCheck koch.nim; then
|
||||||
# Run Nim buildchain, with matching dependency versions
|
# Run Nim buildchain, with matching dependency versions
|
||||||
|
|
Loading…
Reference in New Issue