Skip to content

Commit 6c989aa

Browse files
committed
nix: handle eval error in mkPackage
1 parent 3cb15e5 commit 6c989aa

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

nix/wrapper.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,16 @@ rec {
6262
then [ ]
6363
else
6464
if evalResult.value ? name
65-
then [ (mkPackage newName evalResult.value) ]
65+
then
66+
let
67+
pkgEvalResult = builtins.tryEval mkPackage newName evalResult.value;
68+
in
69+
[
70+
(if pkgEvalResult.success then pkgEvalResult.value else {
71+
attrName = builtins.concatStringsSep "." newName;
72+
evalError = true;
73+
})
74+
]
6675
else
6776
if evalResult.value ? AAAAAASomeThingsFailToEvaluate
6877
then [ ]

0 commit comments

Comments
 (0)