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
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 b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
Also it currently compiles with zen kernels, it doesn't with lqx.
Since we currently don't have a mechanism of lqx only, we can re-add,
if one of the lqx/zen maintainers steps up and also help maintaining and testing sysdig.
On nixos-unstable with the latest kernel (6.2.0), I'm seeing sysdig
fail to compile:
/build/source/build/driver/src/main.c:2788:30: error: assignment to 'char * (*)(const struct device *, umode_t *)' {aka 'char * (*)(const struct device *, short unsigned int *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *)' {aka 'char * (*)(struct device *, short unsigned int *)'} [-Werror=incompatible-pointer-types]
2788 | g_ppm_class->devnode = ppm_devnode;
| ^
/build/libs/userspace/libscap/scap_procs.c: In function 'scap_os_getpid_global':
This has already been fixed upstream, this just cherry-picks that fix.
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
Without the change the build fails as:
sysdig/userspace/sinspui/cursescomponents.cpp: In member function 'void curses_textbox::print_no_data()':
sysdig/userspace/sinspui/cursescomponents.cpp:878:15: error: format not a string literal and no format arguments [-Werror=format-security]
878 | wstr.c_str());
| ^