Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ lib.makeExtensible (
version = "2.28.2";
hash = "sha256-yl+hlZ/VFHIZwPIDEs4ysOYgprW4VEORfSyvScF7Cwg=";
self_attribute_name = "nix_2_28";
patches = [
# fixes user/system registries regression: https://github.com/NixOS/nix/issues/13050
./patches/0001-Revert-Actually-ignore-system-user-registries-during.patch
];
};

nixComponents_git = nixDependencies.callPackage ./modular/packages.nix rec {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 8df4f5db3c71046f5deaeb913e5ec0d16f70b5a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 24 Apr 2025 14:17:18 +0200
Subject: [PATCH] Revert "Actually ignore system/user registries during
locking"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit a08477975d90dc0d2c9f89d2a417bedb5b266931.

Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
src/libflake/flake/flakeref.cc | 2 +-
tests/functional/flakes/flakes.sh | 7 -------
2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/libflake/flake/flakeref.cc b/src/libflake/flake/flakeref.cc
index 1580c2846..6e95eb767 100644
--- a/src/libflake/flake/flakeref.cc
+++ b/src/libflake/flake/flakeref.cc
@@ -39,7 +39,7 @@ FlakeRef FlakeRef::resolve(
ref<Store> store,
const fetchers::RegistryFilter & filter) const
{
- auto [input2, extraAttrs] = lookupInRegistries(store, input, filter);
+ auto [input2, extraAttrs] = lookupInRegistries(store, input);
return FlakeRef(std::move(input2), fetchers::maybeGetStrAttr(extraAttrs, "dir").value_or(subdir));
}

diff --git a/tests/functional/flakes/flakes.sh b/tests/functional/flakes/flakes.sh
index b67a0964a..d8c9f254d 100755
--- a/tests/functional/flakes/flakes.sh
+++ b/tests/functional/flakes/flakes.sh
@@ -220,13 +220,6 @@ nix store gc
nix registry list --flake-registry "file://$registry" --refresh | grepQuiet flake3
mv "$registry.tmp" "$registry"

-# Ensure that locking ignores the user registry.
-mkdir -p "$TEST_HOME/.config/nix"
-ln -sfn "$registry" "$TEST_HOME/.config/nix/registry.json"
-nix flake metadata flake1
-expectStderr 1 nix flake update --flake-registry '' --flake "$flake3Dir" | grepQuiet "cannot find flake 'flake:flake1' in the flake registries"
-rm "$TEST_HOME/.config/nix/registry.json"
-
# Test whether flakes are registered as GC roots for offline use.
# FIXME: use tarballs rather than git.
rm -rf "$TEST_HOME/.cache"
--
2.49.0