From 2a0fddc7d5c44845253267e28c2dedc5c56bf4ac Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Wed, 1 Oct 2025 23:13:11 +0300 Subject: [PATCH] libexpr: Move derivation-internal.nix from corepkgsFS to internalFS Best I can tell this was never supposed to be exposed to the user and has been this way since 2.19. 2.18 did not expose this file to the user: nix run nix/2.18-maintenance -- eval --expr "import " error: getting status of '/__corepkgs__/derivation-internal.nix': No such file or directory --- src/libexpr/eval.cc | 2 +- tests/functional/lang/eval-fail-derivation-name.err.exp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 2df373520..20ebe026a 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -268,7 +268,7 @@ EvalState::EvalState( }()) , corepkgsFS(make_ref()) , internalFS(make_ref()) - , derivationInternal{corepkgsFS->addFile( + , derivationInternal{internalFS->addFile( CanonPath("derivation-internal.nix"), #include "primops/derivation.nix.gen.hh" )} diff --git a/tests/functional/lang/eval-fail-derivation-name.err.exp b/tests/functional/lang/eval-fail-derivation-name.err.exp index 017326c34..ba5ff2d00 100644 --- a/tests/functional/lang/eval-fail-derivation-name.err.exp +++ b/tests/functional/lang/eval-fail-derivation-name.err.exp @@ -1,20 +1,20 @@ error: … while evaluating the attribute 'outPath' - at ::: + at «nix-internal»/derivation-internal.nix::: | value = commonAttrs // { | outPath = builtins.getAttr outputName strict; | ^ | drvPath = strict.drvPath; … while calling the 'getAttr' builtin - at ::: + at «nix-internal»/derivation-internal.nix::: | value = commonAttrs // { | outPath = builtins.getAttr outputName strict; | ^ | drvPath = strict.drvPath; … while calling the 'derivationStrict' builtin - at ::: + at «nix-internal»/derivation-internal.nix::: | | strict = derivationStrict drvAttrs; | ^