These are new dependencies for SILE, currently needed by the flake in the upstream repo and will be needed by the stable package in this repo on the next release
I've been working for a long time towards automatic nix dependencies for
neovim plugins (using luarocks rockspecs to discover the said
dependencies).
This is an initial commit to help me complete the missing bits.
buildNeovimPluginFrom2Nix is right now a placeholder which helps me test
in my fork a version that does a flat install of luarocks.
the vim updater will now check for attributes with the same name in the lua package set,
if that's the case the script will generate buildNeovimPluginFrom2Nix.
Required for Prosody 0.12.0.
I first tried to run the bare
./maintainers/scripts/update-luarocks-packages, however it did break a
fair share of Lua packages.
In the end, I:
1. Added the luaunbound entry to luarocks-packages.csv
2. Run the update-luprocks-packages.
3. Cherry picked the luaunbound entry
4. Reverted the rest of lua-modules/generated-packages.nix to what we
currently have in Nixpkgs.
5. Injected the native unbound library via the lua-modules overrides.
Accept either Nightly or LTS as the solver configuration variable in the
script. The Stackage version is now considered a tuple of solver and
version, allowing the script to handle updates and switches between
solvers gracefully.
Tested updating Nightly and updating from Nightly to LTS.
We have generally shipped the latest cabal-install version. Stackage has
re-added cabal-install recently which caused cabal-install to get
downgraded to 3.4 to match the Cabal version shipped by GHC 9.0.2. This
commit reverts that change.
usage
'./maintainers/scripts/remove-old-aliases.py --year 2018 --file ./pkgs/top-level/aliases.nix'
first the matched lines are converted to throws with the comment
'Converted to throw $CURRENT_DATE'
then the throws older than the passed date are removed.
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
I find it more practical (can run update.py --github-token=$(pass gihtub-token)" rather than putting token in ENV). Also makes it more discoverable. I introduced a FetchConfig variable to pass editor agnostic configuration.
Before 46c68ad both "@" and " as " could be used in the same line like
the following:
vimwiki/vimwiki@dev as vimwiki-dev
After 46c68ad this gives an error due to the split URI still erroneously
including the " as [name]" at the end, due to splitting from the wrong
variable.
configuration-nix.nix uses builtins.intersectAttrs to not any overrides
for packages not present in `super` (presumably for use outside of
nixpkgs?). To accomodate it, we pass an attribute set with every
attribute of haskellPackages, but set to `null` as `super`, and — while
we're at it — a fix point as `self`.
While being able to test them is neat (on x86_64-linux they work very
well, actually), we usually don't want to do this, since the set is
only (recommended to be) used to bootstrap GHC. Consequently there is
almost no binary cache and testing them mostly leads to unenlightening
and seemingly endless compilation.
The added nix expression allows maintainers to check for regressions in
the configuration overlays employed by haskellPackages and friends. The
reasoning behind this is that, if we add an override for something, it
should also build. To test this fact, we extract all attributes touched
by a configuration and obtain all relevant derivations corresponding to
it which can then be thrown into nix-build --keep-going.
I've been using this expression to verify configuration-ghc-9.2.x.nix
for a week or so which works quite well. The amount of stale overrides
in other configuration makes it a bit more painful for other use cases
at the moment.
The "0.5.0-1" rockspec on luarocks has a bug, resulting in it pulling
the current git master version, which is what we have effectively been
using.
Given that 0.5.0-1 is the latest release, is 6 years old, and that there
have been some bug fixes since then, we do actually want to be using the
git master version, but we also want to be using the correct rockspec
(particularly as alt-getopt has been replaced by argparse in the `moon`
binary).
Avoiding passthru itself was the right direction, but not a
complete solution. Passthru attributes typically do not contain
dependencies, but rather extra paths that are not relevant to
the build itself.
Whether we want to include all (passthru) test dependencies this
way can be debated, but removing them makes this expression more
robust.
When updating a package using nix-update-script with `--argstr commit true`,
update.nix would not detect the changes because nix-update would stage them
and `git diff` would be empty.
We now detect both staged and unstaged changes to handle this use case.
- luarocks-nix: bumped to pass args too, `package_X = callPackage ...`.
It allows to remove the annoying `with self`.
This new version disables tests (because broken) and now emits derivation
with a callPackage in front.
- replaced X.override with lib.overrideLuarocks, it should be used
whenever buildInputs/extraVariables is changed since it impacts the
generated luarocks config.
Once structured attributes are in, it will be easier to have the
luarocks config generated by a hook and we probably will be able to
replace all overrideLuarocks by overrideAttrs.
* maintainers/scripts/rebuild-amount.sh: report parallelism setting
This slightly helps discovering parallelism support.
* maintainers/scripts/rebuild-amount.sh: add basic example
It's not clear if script should be used against HEAD or HEAD^.
Let's have a copyable example.
* maintainers/scripts/rebuild-amount.sh: convert tabs to four spaces
One notable change is here-document conversion.
Before:
<TAB>cat <<-FOO
<TAB>...
<TAB>FOO
After:
<sp><sp><sp><sp>cat <<FOO
<sp><sp><sp><sp>...
FOO
Note seemingly misaligned 'FOO': '-FOO' understands leading tabs,
but not spaces.
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.