Check for pure eval mode before calling builtins.storePath

This commit is contained in:
Rebecca Turner 2024-03-08 16:32:20 -08:00
parent 0f9255e01c
commit baa7aa7bd0
Signed by: rbt
SSH key fingerprint: SHA256:SiNaEWabvotTldoNb5jIKqjJ3RnpS4aRXA4KLAdW5vs

View file

@ -110,6 +110,8 @@ let
if builtins.isPath src if builtins.isPath src
then then
if dirOf (toString src) == builtins.storeDir if dirOf (toString src) == builtins.storeDir
# `builtins.storePath` is not available in pure-eval mode.
&& builtins ? currentSystem
then then
# If it's already a store path, don't copy it again. # If it's already a store path, don't copy it again.
builtins.storePath src builtins.storePath src