The *.bt(8) tools are meant to be used as standalone scripts,
their synopsis demonstrates this usage.
Especially under NixOS, calling them via their absoloute path
in interactive shells is a huge pain, however.
Symlink them next to bpftrace(8) itself so they end up in `PATH`
but do not move them to avoid breaking existing setups that expect
them under share/tools/.
This goes in line with our bcc as well as Debian's bpftrace package.
bpftrace ships *.bt replacement scripts for the original bcc programs
but still installs their manual pages as *.8 rather than *.bt.8 which
conflicts with the original manual pages.
Rename them to recover the original manuals and avoid conflict spam:
```
building '/nix/store/jspx13hyfi2m9vlnbj5iywk6rxpxp7y0-system-path.drv'...
warning: collision between `/nix/store/dv7x07rmd2m7596f38kl9d5bnv545qz7-bpftrace-0.14.1-man/share/man/man8/biolatency.8.gz' and `/nix/store/lw1kw7077wk3j6cnvjrm904rs2w7785p-bcc-0.24.0/share/man/man8/biolatency.8.gz'
[... 28 more duplicate manuals ...]
```
bpftrace doesn't actually need to be a kernel package anymore.
It used to require path to kernel sources, but we build our kernels
with IKHEADER and BTF so the currently running configuration can always
be found automatically without any patch
continuation of #109595
pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.
python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
This fixes the `bcc` include directory (which was improperly set, and
warned about at build-time, but masked by some backwards compat code,
apparently) and also includes some missing libraries in `buildInputs`
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Update bpftrace to the latest pre-release, with a real version number.
The most notable change now is that bpftrace can use a stable version of
the 'bcc' toolchain in order to build, meaning no more hacks are needed
to clone the source code and fix up the build system, etc. This
simplifies things greatly and removes the old bcc-source patch.
Similarly, we can remove our custom gtests patch (which disabled the
build) by just passing -DBUILD_TESTING=FALSE when running cmake. This
was also added upstream recently.
However, something does still need to be fixed, at a cost: bpftrace
requires the kernel -dev package because it wants both objects and
include directories (some files are only shipped in one or the other).
Therefore, we remove the dependency on linuxHeaders and instead use
kernel.dev as the sole input to the build.
This is both a positive and a negative: the positive is that tools work
without annoying fatal errors, and that the bpf toolchain is
synchronized to the linuxPackages.kernel derivation it was built
against. The downside is that the .dev expression is much heavier as a
dependency, so bpftrace is now closer to 700mb in closure size. (This
especially hurts across kernel upgrades requiring a whole new rebuild,
especially if you have existing nixos generations that won't GC, etc.)
We probably want to slim this down substantially in the future (and
there may be a few ways to do that), but as this will probably also
touch bcc, and as a first cut of the pre-releases, this is probably fine
while we work out other kinks.
Signed-off-by: Austin Seipp <aseipp@pobox.com>