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.
Upstream is working on some major deprecations, being on a HEAD commit
will not be a good plan going forward.
Remove double `busted` in `checkInputs` - keep only 1.
If the script is executed in a CI (like in github actions, with the
install-nix-action) it fails. This changes fixes that use case. In that
scenario, you should provide the --no-commit flag.
Since Bundler 2+, the lock command generated platform-dependent
Gemfile.locks, which breaks when nix has to build gems from source,
because the gemset generated is tied to the platform which generated it.
Trying to reuse the update scripts used by kakoune/vim to provide the
user with an unified convergence. Some stuff doesn't work yet (parallel
download, caching) but I (anyone else welcome to try too) will improve
it in other PRs.
This commit shows how to convert luarocks packages into (neo)vim ones.
The advantage for neovim lua plugins to register their rockspec (aka
package definition) is that the plugin can express its dependencies and
a few metadata through it.
This should fix
Jul 20 07:16:12 bastion mirror-tarballs-start[21663]: Use of uninitialized value $algo in concatenation (.) or string at ./maintainers/scripts/copy-tarballs.pl line 80.
Jul 20 07:16:12 bastion mirror-tarballs-start[21663]: Use of uninitialized value in subroutine entry at ./maintainers/scripts/copy-tarballs.pl line 185.
Jul 20 07:16:13 bastion mirror-tarballs-start[21663]: error: unknown hash algorithm '' at ./maintainers/scripts/copy-tarballs.pl line 185.
Allow setting the HACKAGE2NIX environment variable to change the
hackage2nix the script uses to an absolute path to a local build. Useful
to test local changes in a realistic environment.
The distinction between the inputs doesn't really make sense in the
mkShell context. Technically speaking, we should be using the
nativeBuildInputs most of the time.
So in order to make this function more beginner-friendly, add "packages"
as an attribute, that maps to nativeBuildInputs.
This commit also updates all the uses in nixpkgs.
We split configuration-hackage2nix.yaml into multiple files. We bump
cabal2nix-unstable to get support for multiple config files in
hackage2nix.
* The file main.yaml is only supposed to be edited by humans.
* The file stackage.yaml is only supposed to be updated by the
update-stackage.sh
* The file broken.yaml can be edited by humans, but probably future
helpers will want to insert broken packages into this file based on
hydra reports.
* The file transitive-broken.yaml is newly introduced to be generated
by regenerate-transitive-broken-packages.sh
regenerate-transitive-broken-packages.sh makes a nix query (in
transitive-broken-packages.nix) which evaluates all haskellPackages
once with and once without "allowBroken" this way it get's a list of
packages which are broken by some transitive dependency, but does not
disable packages which have eval errors not caused by a broken package.
When an update script fails, it might still modify the source tree.
These changes would then be committed in the next update attempt.
Let’s make sure the worktree is clean before updating to avoid that.
This is the preferred format for things fetched from git or similar that
are not proper releases: https://nixos.org/manual/nixpkgs/stable/#sec-package-naming
Also we should think about making name and attribute name more
consistent: cabal2nix-latest -> cabal2nix-unstable
Introduces a script that can be used to update the Nix expressions for
the Haskell package set. In service of that, also
- introduces cabal2nix-latest, which pins the hackage2nix version used
- changes all-cabal-hashes to use fetchFromGitHub
- adds update-hackage.sh & update-cabal2nix-latest.sh & update-stackage.sh maintainer scripts
Move the script to maintainers/scripts/pluginupdate.py.
Importing it from the vim and kakoune update scripts
is done in the commit afterwards to cleanup the diff.
This reverts commit 4b7d9dc868.
The KDE project has changed their source index pages so that the links to
package metadata files are generated by JavaScript after the page loads. As a
result, wget is no longer able to recursively fetch the package metadata
automatically.
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.
Otherwise, it can get tripped up importing things like the NUR packages. Since
this is for linting Nixpkgs itself, ignoring overlays seems the way to go.
- 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.
`update.nix` extracts `passthru.updateScript` attributes in the main repo
and when they are relative paths (e.g. `./update.sh`), Nix will resolve them
to absolute paths in the main repo.
Update scripts can use $(dirname $0) to get the location of files they
should update but that would point to the main repo.
We want them to modify the appropriate git worktree instead
so we replace the prefix accordingly.
`git rev-parse --show-toplevel` will resolve symlinks but, fortunately,
Nix will do that as well, so the path will match:
https://github.com/NixOS/nixpkgs/pull/98304#issuecomment-695761754
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.
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.
It will really happen after regeneration (no need to hurry, I guess).
Commit b7e6161b4 added me to cyrussasl by a mistake apparently.
In knot-resolver upstream we dropped luaossl and luafilesystem from
closure to ease up maintenance, so I no longer have motivation for them.
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.