Skip to content

Commit f607f89

Browse files
authored
Fix Nix detection (#773)
Detect Nix by probing for the presence of the `NIX_STORE` environment variable instead of `NIX_PATH`. The latter is only set in a `nix-shell` session but isn't when building a derivation through `nix-build`. In contrast, the `NIX_STORE` environment variable is set in both cases. Signed-off-by: Vincent Haupert <[email protected]>
1 parent 2ee53db commit f607f89

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

buildenv.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ else ifeq ($(MITIGATION-CVE-2020-0551), CF)
208208
MITIGATION_LIB_PATH := cve_2020_0551_cf
209209
endif
210210

211-
ifneq ($(origin NIX_PATH), environment)
211+
ifneq ($(origin NIX_STORE), environment)
212212
BINUTILS_DIR ?= /usr/local/bin
213213
EXT_BINUTILS_DIR = $(ROOT_DIR)/external/toolset/$(DISTR_ID)$(DISTR_VER)
214214
else

external/ippcp_internal/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ CHECK_SOURCE :=
6868
# For reproducibility build in docker, the code should be
6969
# prepared before build. So skip the code check to avoid
7070
# triggering network request
71-
ifneq ($(origin NIX_PATH), environment)
71+
ifneq ($(origin NIX_STORE), environment)
7272
ifneq ($(PATCH_LOG), SGX.)
7373
CHECK_SOURCE:= ipp_source
7474
endif

0 commit comments

Comments
 (0)