Nixpkgs/Automatic Updates: Difference between revisions

copy edit lede
Move Automatic updates with r-ryantm > nixpkgs-update to the lead as it's the standard behavior
Line 1: Line 1:
Update Scripts can be added to packages by setting <code><nowiki>passthru.updateScript</nowiki></code>. This is then executed by [[r-ryantm]] to create an updated pull request. It can be manually invoked via <code>nix-shell maintainers/scripts/update.nix --argstr package <packagename></code>.
[https://github.com/nix-community/nixpkgs-update nixpkgs-update] is used by [[r-ryantm]] for automated updates (through creating [https://github.com/NixOS/nixpkgs/issues?q=is%3Apr%20author%3Ar-ryantm update pull requests]), if the package does not specify an <code>updateScript</code>. For more info, see the [https://nix-community.github.io/nixpkgs-update/ official documentation].
 
If you're wondering why your package isn't receiving automated updates, it can be useful to check the [https://r.ryantm.com/log/ r-ryantm logs].
 
=== Disabling nixpkgs-update for individual packages ===
 
Put the following comment somewhere in the package file:
 
<syntaxhighlight lang="nix">
# nixpkgs-update: no auto update
</syntaxhighlight>


== Update Scripts ==
== Update Scripts ==
List of prepackaged update scripts.
 
Update Scripts can be added to packages by setting <code><nowiki>passthru.updateScript</nowiki></code>. This is then executed by [[r-ryantm]] to create an update pull request. It can be manually invoked via <code>nix-shell maintainers/scripts/update.nix --argstr package <packagename></code>.
 
List of prepackaged update scripts:


=== nix-update by Mic92 ===
=== nix-update by Mic92 ===
[https://github.com/Mic92/nix-update nix-update] works for a range of different sources and will do the right thing most of the time.
[https://github.com/Mic92/nix-update nix-update] works for a range of different sources and will do the right thing most of the time.


Line 47: Line 61:
};
};
</syntaxhighlight>Source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/common-updater/unstable-updater.nix
</syntaxhighlight>Source: https://github.com/NixOS/nixpkgs/blob/master/pkgs/common-updater/unstable-updater.nix
== Automatic updates with r-ryantm ==
=== nixpkgs-update ===
[https://github.com/nix-community/nixpkgs-update nixpkgs-update] is used by [[r-ryantm]] for automated updates, if the package does not specify an <code>updateScript</code>. For more info, see the [https://nix-community.github.io/nixpkgs-update/ official documentation].
If you're wondering why your package isn't receiving automated updates, it can be useful to check the [https://r.ryantm.com/log/ r-ryantm logs].
=== Disabling nixpkgs-update for individual packages ===
Put the following comment somewhere in the package file:
<syntaxhighlight lang="nix">
# nixpkgs-update: no auto update
</syntaxhighlight>


== Additional Resources ==
== Additional Resources ==