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.
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.
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.