summaryrefslogtreecommitdiffstats
path: root/maintainers/scripts/update.nix
AgeCommit message (Collapse)Author
2022-10-22Merge pull request #160453 from jtojnar/upd-nix-unstable-gitJosé Romildo Malaquias
maintainers/scripts/update.nix: Fix deduplication for unstableGitUpdater
2022-02-21gnome.updateScript: Use experimental support for custom commit messagesJan Tojnar
2022-02-17maintainers/scripts/update.nix: Fix deduplication for unstableGitUpdaterJan Tojnar
Some updaters like `unstableGitUpdater` rely solely `UPDATE_NIX_ATTR_PATH` environment variable to find out package attribute so they all have the same `passthru.updateScript`. This means we cannot rely on that attribute to filter out aliased packages because it would consider all packages using `unstableGitUpdater` the same. We need to use different criterion to distinguish them. `meta.position` is a reasonable candidate but we cannot always utilize it since it might not be available or it might be shared among multiple packages (e.g. when using custom mkDerivation wrapper). Combination of the two attributes should distinguish most cases. Fixes: https://github.com/NixOS/nixpkgs/issues/112583
2021-09-09treewide: "does not exists" -> "does not exist"Alyssa Ross
I noticed this minor grammar mistake when running update.nix, and then while grepping to find the source I noticed we had it a few times in Nixpkgs. Just as easy to fix treewide as it was to fix the one occurrence I noticed.
2021-05-08gnome: rename from gnome3Jan Tojnar
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
2021-05-05maintainers/scripts/update.nix: Add support for filtering pkgs by predicateJan Tojnar
Arbitrary predicate is useful for updating decentralised package sets like GNOME.
2020-12-16maintainers/scripts/update.nix: Do not traverse listsJan Tojnar
Lists items are not directly accessible like attributes in attrsets are. This makes it hard to represent their address in `UPDATE_NIX_ATTR_PATH` environment variable passed to update scripts. Given that I only introduced list support for `gnome3` attribute set and we stopped using them there, let’s remove the list support again. NixOS modules are better place for package collections anyway. This was meant to go in with https://github.com/NixOS/nixpkgs/pull/98304 but got accidentally omitted somehow.
2020-09-20maintainers/scripts/update.nix: Clean upJan Tojnar
- Make some arguments more fitting (the path is actually full, not just relative to prefix…). - Increase the purity of packages* functions (they now take pkgs from argument, not from scope). - Add some documentation comments.
2020-09-20maintainers/scripts/update.nix: auto-detect attrPathJan Tojnar
2020-09-20maintainers/scripts/update.nix: support auto-committing by passing attrPathJan Tojnar
Instead of having the updateScript support returning JSON object, it should be sufficient to specify attrPath in passthru.updateScript. It is much easier to use. The former is now considered experimental.
2020-09-20maintainers/scripts/update.nix: Add support for auto-commiting changesJan Tojnar
Update scripts can now declare features using passthru.updateScript = { command = [ ../../update.sh pname ]; supportedFeatures = [ "commit" ]; }; A `commit` feature means that when the update script finishes successfully, it will print a JSON list like the following: [ { "attrPath": "volume_key", "oldVersion": "0.3.11", "newVersion": "0.3.12", "files": [ "/path/to/nixpkgs/pkgs/development/libraries/volume-key/default.nix" ] } ] and data from that will be used when update.nix is run with --argstr commit true to create commits. We will create a new git worktree for each thread in the pool and run the update script there. Then we will commit the change and cherry pick it in the main repo, releasing the worktree for a next change.
2020-07-07update.nix: Allow passing overlaysJan Tojnar
Previously, we relied on NIX_PATH for passing overlays but with flakes, we should pass them explicitly.
2020-05-13maintainers/scripts/update.nix: refactor package collectorJan Tojnar
The `packagesWith` function expected an attrSet but `packagesWithUpdateScript` could be passing it a derivation or a list when the attribute path supplied by user through the `--argstr path` argument pointed to one. It only worked because derivations are also attrSets and contain their outputs as attributes, and did not work for lists at all. Additionally, the improper handling would cause the `src` attribute to be built in some rare cases (`mkYarnPackage` seems to trigger this). Rewriting the `packagesWith` function to be inductive with a derivation as a base case and attrSets and lists as inductive steps is much cleaner and also fixes the unnecessary build.
2020-05-13maintainers/scripts/update.nix: derivation is the final stationJan Tojnar
It does not make sense to look for derivations within derivations, not even when `recurseForDerivations` is true. Nix does not do that either: https://github.com/NixOS/nix/blob/ebc024df2287085d48ed6194aa756fd70c07f76c/src/libexpr/get-drvs.cc#L346-L355
2020-05-13maintainers/scripts/update.nix: Import lib into scopeJan Tojnar
This will make it easier to change it if we want to decouple from pkgs.
2020-02-19maintainers/scripts/update.nix: allow updating overlaysJan Tojnar
2019-12-20maintainers update.nix: fix typo in script helpdanbst
2019-11-25update.nix: fix evalworldofpeace
2019-11-24treewide: Get rid of most `parseDrvName` without breaking compatJohn Ericson
That is because this commit should be merged to both master and release-19.09.
2019-06-02maintainers/scripts/update.nix: Clean upJan Tojnar
Make calling update.py a little nicer
2019-06-02maintainers/scripts/update.nix: handle null pathsJan Tojnar
Previously we did not handle non-existant paths making the program crash. Let’s show a proper error.
2019-06-02maintainers/scripts/update.nix: ignore overlaysJan Tojnar
It makes little sense for update.nix to try to update overlays; for most people, they will point to a read-only repository most of the cases.
2019-06-02maintainers/scripts/update.nix: Do not store updateScriptsJan Tojnar
For update script parallelization, we have started calling builtins.toJSON on updateScripts, which triggers evaluation of paths and therefore their copying to Nix store. This breaks update scripts that assume that they exist in nixpkgs like dwarf-fortress. https://github.com/NixOS/nixpkgs/issues/61935 Let’s stringify the paths before JSONification to prevent the evaluation.
2018-12-01update.nix: Run update scripts in parallelJan Tojnar
To make updating large attribute sets faster, the update scripts are now run in parallel. Please note the following changes in semantics: - The string passed to updateScript needs to be a path to an executable file. - The updateScript can also be a list: the tail elements will then be passed to the head as command line arguments.
2018-03-18meta: fix fallout from #36275Matthew Bauer
2018-03-13maintainers/scripts/update.nix: use saner nubbingJan Tojnar
2018-03-13maintainers/scripts/update.nix: fix error messageJan Tojnar
2018-03-01maintainers/scripts/update.nix: allow updating package collectionsJan Tojnar
2018-03-01maintainers/scripts/update.nix: deduplicate packagesJan Tojnar
Lot of my GNOME packages have several legacy aliases, which causes them to be updated multiple times. This patch uses lib.unique to remove the duplicates.
2016-12-18update.nix moved to maintainers/scripts/update.nixRok Garbas