nixd only uses LLVM's Support/ADT utilities, but linking the monolithic
libLLVM dylib pulled the entire ~550 MiB LLVM lib output into the
runtime closure. 2.9.2 adds a meson option to link the static "support"
component instead; closure goes from 702 MiB to 158 MiB
Without the change the build in` staging` fails as:
In file included from ../lib/Controller/DocumentHighlight.cpp:10:
../include/nixd/Controller/Controller.h:139:48: error: 'default_thread_pool_size' is not a member of 'boost::asio::detail'
139 | static_cast<size_t>(boost::asio::detail::default_thread_pool_size())};
| ^~~~~~~~~~~~~~~~~~~~~~~~
Co-authored-by: Doron Behar <doron.behar@gmail.com>
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
If a Python package does not come with either `format` or `pyproject` we
consider it a setuptools build, that calls `setup.py` directly, which is
deprecated.
This change, as a first step, migrates a large chunk of these packages to
set setuptools as their explicit format
This is so we can unify the problem space for the next step of the
migration.
This reverts commit 65a333600d.
This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.
It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).
A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.
[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
Overlays for CppNix nightly, Lix, or Tvix want to change the default Nix
implementation in Nixpkgs by overriding `pkgs.nix`. However, some
packages link against the internal/unstable CppNix APIs directly, and
these packages will break if built with different versions or
implementations of Nix.
If you want to swap out the Nix implementation in your package set, you
don't want these packages to break. Therefore, some packages will refer
to `nixForLinking` explicitly, at least until these dependencies can be
sorted out.
The addition of an explicit `nixForLinking` attribute decoupled from
`nix`, which is just "a Nix implementation", will help Nix
implementation maintainers test Nix implementations in Nixpkgs with
minimal hassle.
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev 78e9caf153
result/bin/apply-formatting $NIXPKGS_PATH
We are migrating packages that meet below requirements:
1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration
The tool is here: https://github.com/Aleksanaa/by-name-migrate.