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.
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
the recent luarocks can install for a different interpreter than the one
running luarocks.
Due to the way the update is done on nix, it seems more practical to use
this feature than running the script with different luarocks-nix ?
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.
One bugfix patch is included - merged upstream but not released yet.
knot-resolver wrapper would need to add binaryheap explicitly,
so it's migrated to the automatic LUA path discovery instead.
Similarly rename std.normalize to std_normalize.
Having a dot in the name prevents some changes to the lua infrastructure,
for instance passing attribute names { std._debug }: to a function would fail with
`syntax error, unexpected ',', expecting '.' or '=',`
Also made changes to lua package generation system to account for packages like cqueues
that have one version per lua interpreter.
The csv file also accepts comments now.
* neovim-unwrapped: now use lua environments
* mpv: use lua environments
* luaPackages.inspect: init at 3.1.1-0
* luaPackages.lgi: mark as a lua module
* luaPackages.vicious: mark as a lua module
* lua: generate packages from luarocks
* luarocks-nix: update
* removed packages already available in nixpkgs
* adressing reviews
update script can now accept another csv file as input with -c
* Remove obsolete comment
All Python packages now have an updateScript. The script calls
`update-python-libraries` and passes it the position of the derivation
expression obtained using `meta.position`. This works fine in case a Nix
expression represents only a single derivation. If there are more in it,
`update-python-libraries` will fail.
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.
* Print Dependency failures as well as direct failures and update to Python3
some package fail due to non-exposed dependencies and would thus not appear in the list, for example gcj
* hydra-eval-failures: simpler hashbang
Based on https://github.com/NixOS/nixpkgs/pull/34842, the
nix-instantiate output was pretty-printed and the validity of the github handles
manually verified, by automatically checking whether the user handles exist on
github (https://github.com/userhandle, status 200 or 404).
Each handle under 5 characters was manually checked (because the collision
probability with non-maintainer accounts is high), each missing entry was
manually researched.
The script used is kept in `maintainers/scripts` as an example of how to work
with the mainainers list through nix’ JSON interface.
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.