Commit 7a07cc0 1 parent 46c7edc commit 7a07cc0 Copy full SHA for 7a07cc0
File tree 2 files changed +17
-1
lines changed
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -2434,7 +2434,13 @@ rec {
2434
2434
if isStringLike x then
2435
2435
let str = toString x ; in
2436
2436
substring 0 1 str == "/"
2437
- && dirOf str == storeDir
2437
+ && ( dirOf str == storeDir
2438
+ # Match content‐addressed derivations, which _currently_ do not have a
2439
+ # store directory prefix.
2440
+ # This is a workaround for https://github.com/NixOS/nix/issues/12361
2441
+ # which was needed during the experimental phase of ca-derivations and
2442
+ # should be removed once the issue has been resolved.
2443
+ || builtins . match "/[0-9a-z]{52}" str != null )
2438
2444
else
2439
2445
false ;
2440
2446
Original file line number Diff line number Diff line change @@ -537,6 +537,7 @@ runTests {
537
537
expr =
538
538
let goodPath =
539
539
"${ builtins . storeDir } /d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11" ;
540
+ goodCAPath = "/1121rp0gvr1qya7hvy925g5kjwg66acz6sn1ra1hca09f1z5dsab" ;
540
541
in {
541
542
storePath = isStorePath goodPath ;
542
543
storePathDerivation = isStorePath ( import ../.. { system = "x86_64-linux" ; } ) . hello ;
@@ -545,6 +546,12 @@ runTests {
545
546
nonAbsolute = isStorePath ( concatStrings ( tail ( stringToCharacters goodPath ) ) ) ;
546
547
asPath = isStorePath ( /. + goodPath ) ;
547
548
otherPath = isStorePath "/something/else" ;
549
+
550
+ caPath = isStorePath goodCAPath ;
551
+ caPathAppendix = isStorePath
552
+ "${ goodCAPath } /bin/python" ;
553
+ caAsPath = isStorePath ( /. + goodCAPath ) ;
554
+
548
555
otherVals = {
549
556
attrset = isStorePath { } ;
550
557
list = isStorePath [ ] ;
@@ -557,6 +564,9 @@ runTests {
557
564
storePathAppendix = false ;
558
565
nonAbsolute = false ;
559
566
asPath = true ;
567
+ caPath = true ;
568
+ caPathAppendix = false ;
569
+ caAsPath = true ;
560
570
otherPath = false ;
561
571
otherVals = {
562
572
attrset = false ;
You can’t perform that action at this time.
0 commit comments