| Commit message (Expand) | Author | Age | Files | Lines |
| * | maintainers/scripts/update: Allow updating in (reverse) topological order•••Previously, when updating multiple packages, we just updated them in arbitrary order. However, when some of those packages depended on each other, it could happen that some of the intermediary commits would not build because of version constraints on dependencies.
If we want each commit in the history to build when feasible, we need to consider four different scenarios:
1. Updated dependant is compatible with both the old and the new version of the dependency. Order of commits does not matter. But updating dependents first (i.e. reverse topological order) is useful since it allows building each package on the commit that updates it with minimal rebuilds.
2. Updated dependant raises the minimal dependency version. Dependency needs to be updated first (i.e. topological order).
3. Old dependant sets the maximal dependency version. Dependant needs to be updated first (i.e. reverse topological order).
4. Updated dependant depends on exact version of dependency and they are expected to be updated in lockstep. The earlier commit will be broken no matter the order.
This change allows selecting the order of updates to facilitate the first three scenarios. Since most package sets only have loose version constraints, the reverse topological order will generally be the most convenient. In major package set updates like bumping GNOME release, there will be exceptions (e.g. libadwaita typically requires GTK 4 from the same release) but those were probably in broken order before as well.
The downside of this feature is that it is quite slow – it requires instantiating each package and then querying Nix store for requisites.
It may also fail to detect dependency if there are multiple variants of the package and dependant uses a different one than the canonical one.
Testing with:
env GNOME_UPDATE_STABILITY=unstable NIX_PATH=nixpkgs=$HOME/Projects/nixpkgs nix-shell maintainers/scripts/update.nix --arg predicate '(path: pkg: path == ["gnome-shell"] || path == ["mutter"] || path == ["glib"] || path == ["gtk3"] || path == ["pango"] || path == ["gnome-text-editor"])' --argstr order reverse-topological --argstr commit true --argstr max-workers 4
| Jan Tojnar | 2025-03-03 | 1 | -1/+15 |
| * | treewide: format all inactive Nix files•••After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
| Silvan Mosberger | 2024-12-10 | 1 | -96/+131 |
| * | maintainers/scripts/update: add dependencies to nativeBuildInputs•••This allows update.nix to work with a pure shell.
| David McFarland | 2024-11-17 | 1 | -0/+1 |
| * | maintainers/scripts/update-dotnet-lockfiles.nix: use update.nix | David McFarland | 2024-11-17 | 1 | -8/+9 |
| * | maintainers/scripts/update: disable aliases | David McFarland | 2024-11-17 | 1 | -2/+2 |
| * | treewide: remove executable bit from .nix files•••???
| Alyssa Ross | 2024-09-14 | 1 | -0/+0 |
| * | Merge pull request #319860 from superherointj/update-script-skip-prompt•••maintainers/scripts/update: support skipping prompts | ❄️ | 2024-07-12 | 1 | -1/+7 |
| |\ |
|
| | * | maintainers/scripts/update.py: support skipping prompts | superherointj | 2024-06-14 | 1 | -1/+7 |
| * | | nautilus: Move from gnome scope to top-level | Jan Tojnar | 2024-07-01 | 1 | -1/+1 |
| |/ |
|
| * | maintainers/scripts/update.nix: Add comment, remove TODO | Robert Hensing | 2023-02-26 | 1 | -2/+7 |
| * | Merge pull request #160453 from jtojnar/upd-nix-unstable-git•••maintainers/scripts/update.nix: Fix deduplication for unstableGitUpdater | José Romildo Malaquias | 2022-10-22 | 1 | -1/+11 |
| |\ |
|
| | * | maintainers/scripts/update.nix: Fix deduplication for unstableGitUpdater•••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
| Jan Tojnar | 2022-02-17 | 1 | -1/+11 |
| * | | gnome.updateScript: Use experimental support for custom commit messages | Jan Tojnar | 2022-02-21 | 1 | -1/+1 |
| |/ |
|
| * | treewide: "does not exists" -> "does not exist"•••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.
| Alyssa Ross | 2021-09-09 | 1 | -2/+2 |
| * | gnome: rename from gnome3•••Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
| Jan Tojnar | 2021-05-08 | 1 | -2/+2 |
| * | maintainers/scripts/update.nix: Add support for filtering pkgs by predicate•••Arbitrary predicate is useful for updating decentralised package sets like GNOME.
| Jan Tojnar | 2021-05-05 | 1 | -1/+13 |
| * | maintainers/scripts/update.nix: Do not traverse lists•••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.
| Jan Tojnar | 2020-12-16 | 1 | -3/+1 |
| * | maintainers/scripts/update.nix: Clean up•••- 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.
| Jan Tojnar | 2020-09-20 | 1 | -29/+51 |
| * | maintainers/scripts/update.nix: auto-detect attrPath | Jan Tojnar | 2020-09-20 | 1 | -25/+28 |
| * | maintainers/scripts/update.nix: support auto-committing by passing attrPath•••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.
| Jan Tojnar | 2020-09-20 | 1 | -0/+2 |
| * | maintainers/scripts/update.nix: Add support for auto-commiting changes•••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.
| Jan Tojnar | 2020-09-20 | 1 | -2/+10 |
| * | update.nix: Allow passing overlays•••Previously, we relied on NIX_PATH for passing overlays but with flakes, we should pass them explicitly.
| Jan Tojnar | 2020-07-07 | 1 | -1/+7 |
| * | maintainers/scripts/update.nix: refactor package collector•••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.
| Jan Tojnar | 2020-05-13 | 1 | -27/+30 |
| * | maintainers/scripts/update.nix: derivation is the final station•••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
| Jan Tojnar | 2020-05-13 | 1 | -2/+2 |
| * | maintainers/scripts/update.nix: Import lib into scope•••This will make it easier to change it if we want to decouple from pkgs.
| Jan Tojnar | 2020-05-13 | 1 | -15/+17 |
| * | maintainers/scripts/update.nix: allow updating overlays | Jan Tojnar | 2020-02-19 | 1 | -3/+2 |
| * | maintainers update.nix: fix typo in script help | danbst | 2019-12-20 | 1 | -1/+1 |
| * | update.nix: fix eval | worldofpeace | 2019-11-25 | 1 | -1/+1 |
| * | treewide: Get rid of most `parseDrvName` without breaking compat•••That is because this commit should be merged to both master and
release-19.09.
| John Ericson | 2019-11-24 | 1 | -1/+1 |
| * | maintainers/scripts/update.nix: Clean up•••Make calling update.py a little nicer
| Jan Tojnar | 2019-06-02 | 1 | -1/+9 |
| * | maintainers/scripts/update.nix: handle null paths•••Previously we did not handle non-existant paths making the program crash.
Let’s show a proper error.
| Jan Tojnar | 2019-06-02 | 1 | -3/+6 |
| * | maintainers/scripts/update.nix: ignore overlays•••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.
| Jan Tojnar | 2019-06-02 | 1 | -1/+3 |
| * | maintainers/scripts/update.nix: Do not store updateScripts•••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.
| Jan Tojnar | 2019-06-02 | 1 | -1/+1 |
| * | update.nix: Run update scripts in parallel•••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.
| Jan Tojnar | 2018-12-01 | 1 | -34/+19 |
| * | meta: fix fallout from #36275 | Matthew Bauer | 2018-03-18 | 1 | -1/+1 |
| * | maintainers/scripts/update.nix: use saner nubbing | Jan Tojnar | 2018-03-13 | 1 | -1/+12 |
| * | maintainers/scripts/update.nix: fix error message | Jan Tojnar | 2018-03-13 | 1 | -1/+1 |
| * | maintainers/scripts/update.nix: allow updating package collections | Jan Tojnar | 2018-03-01 | 1 | -1/+16 |
| * | maintainers/scripts/update.nix: deduplicate packages•••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.
| Jan Tojnar | 2018-03-01 | 1 | -14/+16 |
| * | update.nix moved to maintainers/scripts/update.nix | Rok Garbas | 2016-12-18 | 1 | -0/+131 |