From 808b5859adfe3b6c318177466092783e59ffa5b0 Mon Sep 17 00:00:00 2001 From: dramforever Date: Sun, 18 Aug 2024 16:31:47 +0800 Subject: [PATCH] Fix nix-flake-default.patch --- nix-patches/nix-flake-default.patch | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/nix-patches/nix-flake-default.patch b/nix-patches/nix-flake-default.patch index cd0817d..1896c90 100644 --- a/nix-patches/nix-flake-default.patch +++ b/nix-patches/nix-flake-default.patch @@ -1,8 +1,16 @@ diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc -index 0fe956ec0..4872205a5 100644 +index 0fe956ec0..00c62b870 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc -@@ -45,6 +45,23 @@ void completeFlakeInputPath( +@@ -21,6 +21,7 @@ + #include "url.hh" + #include "registry.hh" + #include "build-result.hh" ++#include "config-global.hh" + + #include + #include +@@ -45,6 +46,23 @@ void completeFlakeInputPath( } } @@ -26,7 +34,7 @@ index 0fe956ec0..4872205a5 100644 MixFlakeOptions::MixFlakeOptions() { auto category = "Common flake-related options"; -@@ -326,22 +343,37 @@ void completeFlakeRefWithFragment( +@@ -326,22 +344,37 @@ void completeFlakeRefWithFragment( /* Look for flake output attributes that match the prefix. */ try { @@ -69,7 +77,7 @@ index 0fe956ec0..4872205a5 100644 auto evalCache = openEvalCache(*evalState, std::make_shared(lockFlake( -@@ -352,6 +384,7 @@ void completeFlakeRefWithFragment( +@@ -352,6 +385,7 @@ void completeFlakeRefWithFragment( if (prefixRoot == "."){ attrPathPrefixes.clear(); } @@ -77,7 +85,7 @@ index 0fe956ec0..4872205a5 100644 /* Complete 'fragment' relative to all the attrpath prefixes as well as the root of the flake. */ -@@ -377,7 +410,12 @@ void completeFlakeRefWithFragment( +@@ -377,7 +411,12 @@ void completeFlakeRefWithFragment( /* Strip the attrpath prefix. */ attrPath2.erase(attrPath2.begin(), attrPath2.begin() + attrPathPrefix.size()); // FIXME: handle names with dots @@ -91,7 +99,7 @@ index 0fe956ec0..4872205a5 100644 } } } -@@ -414,7 +452,7 @@ void completeFlakeRef(AddCompletions & completions, ref store, std::strin +@@ -414,7 +453,7 @@ void completeFlakeRef(AddCompletions & completions, ref store, std::strin if (!hasPrefix(prefix, "flake:") && hasPrefix(from, "flake:")) { std::string from2(from, 6); if (hasPrefix(from2, prefix)) @@ -100,7 +108,7 @@ index 0fe956ec0..4872205a5 100644 } else { if (hasPrefix(from, prefix)) completions.add(from); -@@ -539,8 +577,13 @@ Installables SourceExprCommand::parseInstallables( +@@ -539,8 +578,13 @@ Installables SourceExprCommand::parseInstallables( } try {