Skip to content

Commit 5b4be0d

Browse files
committed
Don't require the top-level flake to be lockable
Even with lazy trees, this forced a NAR hash computation for path flakes that we don't want.
1 parent d82a601 commit 5b4be0d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/libflake/flake.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ lockFlake(const Settings & settings, EvalState & state, const FlakeRef & topRef,
436436
auto useRegistriesTop = useRegistries ? fetchers::UseRegistries::All : fetchers::UseRegistries::No;
437437
auto useRegistriesInputs = useRegistries ? fetchers::UseRegistries::Limited : fetchers::UseRegistries::No;
438438

439-
auto flake = getFlake(state, topRef, useRegistriesTop, {}, lockFlags.requireLockable);
439+
auto flake = getFlake(state, topRef, useRegistriesTop, {}, false);
440440

441441
if (lockFlags.applyNixConfig) {
442442
flake.config.apply(settings);

tests/functional/nix-profile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cp "${config_nix}" "$flake1Dir"/
5454
nix-env -f ./user-envs.nix -i foo-1.0
5555
nix profile list | grep -A2 'Name:.*foo' | grep 'Store paths:.*foo-1.0'
5656
nix profile add "$flake1Dir" -L
57-
nix profile list | grep -A4 'Name:.*flake1' | grep 'Locked flake URL:.*narHash'
57+
#nix profile list | grep -A4 'Name:.*flake1' | grep 'Locked flake URL:.*narHash'
5858
[[ $("$TEST_HOME"/.nix-profile/bin/hello) = "Hello World" ]]
5959
[ -e "$TEST_HOME"/.nix-profile/share/man ]
6060
# shellcheck disable=SC2235

0 commit comments

Comments
 (0)