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.
It does not make sense to look for derivations within derivations,
not even when `recurseForDerivations` is true. Nix does not do that either:
ebc024df22/src/libexpr/get-drvs.cc (L346-L355)
This commit:
- Moves the update script into the dir, out of the maintainers dir. This makes
it more discoverable in general. It can also be invoked from anywhere to write
to default.nix
- Swaps it to use the standardized `passthru.updateScript`. This means that
eventually bots like `nixpkgs-update` will be able to handle it.
- Runs the script to upgrade to the latest versions
See https://nixos.org/nixpkgs/manual/#ssec-stdenv-attributes
Leave license empty when it is not provided. This prevents packages from
failing to build because the license is set to
`stdenv.lib.licenses.unkown`.
There will still be a warning about the unkown license.
Not only the binary `parallel` displays a re,inder to quote their
software but it systematically breaks update here regardless of my
network quality.
Better be slow than fail. If anyone can fix it, we may rollback this.
The `name` parameter to buildPerlPackage is deprecated, and
everything currently in perl-packages.nix has already been
converted to use pname/version instead.
This also changes the URLs to be pure string literals,
matching the convention used in nixpkgs in practice.
Changes:
- Fetches rocks and builds Nix expressions for them in parallel
- Passes 'maintainers' list to luarocks-nix
- Constructs the luarocks argument list more cleanly, by using an
indexed array
- Made indentation consistent