summaryrefslogtreecommitdiff
path: root/lib/strings.nix
diff options
context:
space:
mode:
authorMikael Voss <mvs@nyantec.com>2025-03-05 13:08:41 +0100
committerMikael Voss <mvs@nyantec.com>2025-03-05 13:08:41 +0100
commit7a07cc0da9787e936a6b4099c1109906088d3868 (patch)
tree8624dca2143ca1a048231696862de7d2857a89d2 /lib/strings.nix
parentelectron-{24,27,28,29,30,31}-bin: remove (#384809) (diff)
downloadnixpkgs-7a07cc0da9787e936a6b4099c1109906088d3868.tar.gz
lib/strings: allow CA paths in isStorePath
Diffstat (limited to 'lib/strings.nix')
-rw-r--r--lib/strings.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index bcaaab9af4fb..7ee459f5b443 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -2434,7 +2434,13 @@ rec {
if isStringLike x then
let str = toString x; in
substring 0 1 str == "/"
- && dirOf str == storeDir
+ && (dirOf str == storeDir
+ # Match content‐addressed derivations, which _currently_ do not have a
+ # store directory prefix.
+ # This is a workaround for https://github.com/NixOS/nix/issues/12361
+ # which was needed during the experimental phase of ca-derivations and
+ # should be removed once the issue has been resolved.
+ || builtins.match "/[0-9a-z]{52}" str != null)
else
false;