Overlays: Difference between revisions
imported>Tmillr m typo |
imported>Mcdonc Distinguish between extensible and non-extensible attribute sets |
||
Line 253: | Line 253: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Overriding a package inside an attribute set === | === Overriding a package inside an extensible attribute set === | ||
Here is an example of adding plugins to `vimPlugins`. | Here is an example of adding plugins to `vimPlugins`. | ||
Line 262: | Line 262: | ||
}); | }); | ||
} | } | ||
</syntaxhighlight> | |||
=== Overrding a package inside a plain attribute set === | |||
Here's an example of overriding the source of <code>obs-studio-plugins.obs-backgroundremoval</code>. | |||
<syntaxhighlight lang="nix"> | |||
final: prev: { | |||
obs-studio-plugins = prev.obs-studio-plugins // { | |||
obs-backgroundremoval = | |||
prev.obs-studio-plugins.obs-backgroundremoval.overrideAttrs (old: { | |||
version = "0.5.17"; | |||
src = prev.fetchFromGitHub { | |||
owner = "royshil"; | |||
repo = "obs-backgroundremoval"; | |||
rev = "v0.5.17"; | |||
hash = ""; | |||
}; | |||
}); | |||
}; | |||
}; | |||
</syntaxhighlight> | </syntaxhighlight> | ||