-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#9216 from obsidiansystems/addDrvOutputDepend…
…encies-pre Add `builtins.addDrvOutputDependencies` (cherry picked from commit a58d7f1) Change-Id: Ia5a1790bf29dfaf29287cc35cdae6b6d650e7a83
- Loading branch information
eldritch horrors
committed
Mar 4, 2024
1 parent
032eff7
commit ea10088
Showing
9 changed files
with
169 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/functional/lang/eval-fail-addDrvOutputDependencies-empty-context.err.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: | ||
… while calling the 'addDrvOutputDependencies' builtin | ||
|
||
at /pwd/lang/eval-fail-addDrvOutputDependencies-empty-context.nix:1:1: | ||
|
||
1| builtins.addDrvOutputDependencies "" | ||
| ^ | ||
2| | ||
|
||
error: context of string '' must have exactly one element, but has 0 |
1 change: 1 addition & 0 deletions
1
tests/functional/lang/eval-fail-addDrvOutputDependencies-empty-context.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
builtins.addDrvOutputDependencies "" |
11 changes: 11 additions & 0 deletions
11
tests/functional/lang/eval-fail-addDrvOutputDependencies-multi-elem-context.err.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: | ||
… while calling the 'addDrvOutputDependencies' builtin | ||
|
||
at /pwd/lang/eval-fail-addDrvOutputDependencies-multi-elem-context.nix:18:4: | ||
|
||
17| | ||
18| in builtins.addDrvOutputDependencies combo-path | ||
| ^ | ||
19| | ||
|
||
error: context of string '/nix/store/pg9yqs4yd85yhdm3f4i5dyaqp5jahrsz-fail.drv/nix/store/2dxd5frb715z451vbf7s8birlf3argbk-fail-2.drv' must have exactly one element, but has 2 |
18 changes: 18 additions & 0 deletions
18
tests/functional/lang/eval-fail-addDrvOutputDependencies-multi-elem-context.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
let | ||
drv0 = derivation { | ||
name = "fail"; | ||
builder = "/bin/false"; | ||
system = "x86_64-linux"; | ||
outputs = [ "out" "foo" ]; | ||
}; | ||
|
||
drv1 = derivation { | ||
name = "fail-2"; | ||
builder = "/bin/false"; | ||
system = "x86_64-linux"; | ||
outputs = [ "out" "foo" ]; | ||
}; | ||
|
||
combo-path = "${drv0.drvPath}${drv1.drvPath}"; | ||
|
||
in builtins.addDrvOutputDependencies combo-path |
11 changes: 11 additions & 0 deletions
11
tests/functional/lang/eval-fail-addDrvOutputDependencies-wrong-element-kind.err.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: | ||
… while calling the 'addDrvOutputDependencies' builtin | ||
|
||
at /pwd/lang/eval-fail-addDrvOutputDependencies-wrong-element-kind.nix:9:4: | ||
|
||
8| | ||
9| in builtins.addDrvOutputDependencies drv.outPath | ||
| ^ | ||
10| | ||
|
||
error: `addDrvOutputDependencies` can only act on derivations, not on a derivation output such as 'out' |
9 changes: 9 additions & 0 deletions
9
tests/functional/lang/eval-fail-addDrvOutputDependencies-wrong-element-kind.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let | ||
drv = derivation { | ||
name = "fail"; | ||
builder = "/bin/false"; | ||
system = "x86_64-linux"; | ||
outputs = [ "out" "foo" ]; | ||
}; | ||
|
||
in builtins.addDrvOutputDependencies drv.outPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[ true true true true true true ] | ||
[ true true true true true true true true true true true true true ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters