lib.addMetaAttrs: use overrideAttrs when available (#423615)
This commit is contained in:
+8
-1
@@ -44,7 +44,14 @@ rec {
|
||||
|
||||
:::
|
||||
*/
|
||||
addMetaAttrs = newAttrs: drv: drv // { meta = (drv.meta or { }) // newAttrs; };
|
||||
addMetaAttrs =
|
||||
newAttrs: drv:
|
||||
if drv ? overrideAttrs then
|
||||
drv.overrideAttrs (old: {
|
||||
meta = (old.meta or { }) // newAttrs;
|
||||
})
|
||||
else
|
||||
drv // { meta = (drv.meta or { }) // newAttrs; };
|
||||
|
||||
/**
|
||||
Disable Hydra builds of given derivation.
|
||||
|
||||
Reference in New Issue
Block a user