forked from mirrors/nixpkgs
bpftrace: Rename *.8 to *.bt.8 to avoid bcc conflicts
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 ...] ```
This commit is contained in:
parent
e37248668b
commit
1a20dbc086
|
@ -4,12 +4,31 @@
|
|||
, libelf, libbfd, libbpf, libopcodes, bcc
|
||||
, cereal, asciidoctor
|
||||
, nixosTests
|
||||
, util-linux
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpftrace";
|
||||
version = "0.14.1";
|
||||
|
||||
# Cherry-picked from merged PR, remove this hook on next update
|
||||
# https://github.com/iovisor/bpftrace/pull/2242
|
||||
# Cannot `fetchpatch` such pure renaming diff since
|
||||
# https://github.com/iovisor/bpftrace/commit/2df807dbae4037aa8bf0afc03f52fb3f6321c62a.patch
|
||||
# does not contain any diff in unified format but just this instead:
|
||||
# ...
|
||||
# man/man8/{bashreadline.8 => bashreadline.bt.8} | 0
|
||||
# ...
|
||||
# 35 files changed, 0 insertions(+), 0 deletions(-)
|
||||
# rename man/man8/{bashreadline.8 => bashreadline.bt.8} (100%)
|
||||
# ...
|
||||
# on witch `fetchpatch` fails with
|
||||
# error: Normalized patch '/build/patch' is empty (while the fetched file was not)!
|
||||
# Did you maybe fetch a HTML representation of a patch instead of a raw patch?
|
||||
postUnpack = ''
|
||||
rename .8 .bt.8 "$sourceRoot"/man/man8/*.8
|
||||
'';
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iovisor";
|
||||
repo = "bpftrace";
|
||||
|
@ -29,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||
cereal asciidoctor
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config flex bison llvmPackages.llvm.dev ];
|
||||
nativeBuildInputs = [ cmake pkg-config flex bison llvmPackages.llvm.dev util-linux ];
|
||||
|
||||
# tests aren't built, due to gtest shenanigans. see:
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue