Skip to content

Commit 5353990

Browse files
committed
systemtap: remove hack, fix build
1 parent 060cf0d commit 5353990

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

pkgs/development/tools/profiling/systemtap/default.nix

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,10 @@ let
2222
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ]; # Needed with GCC 12
2323
};
2424

25-
## a kernel build dir as expected by systemtap
26-
kernelBuildDir = runCommand "kbuild-${kernel.version}-merged" { } ''
27-
mkdir -p $out
28-
for f in \
29-
${kernel}/System.map \
30-
${kernel.dev}/vmlinux \
31-
${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/{*,.*}
32-
do
33-
ln -s $(readlink -f $f) $out
34-
done
35-
'';
36-
3725
pypkgs = with python3.pkgs; makePythonPath [ pyparsing ];
3826

3927
in runCommand "systemtap-${kernel.version}-${version}" {
40-
inherit stapBuild kernelBuildDir;
28+
inherit stapBuild;
4129
nativeBuildInputs = [ makeWrapper ];
4230
meta = {
4331
homepage = "https://sourceware.org/systemtap/";
@@ -52,7 +40,7 @@ in runCommand "systemtap-${kernel.version}-${version}" {
5240
done
5341
rm $out/bin/stap $out/bin/dtrace
5442
makeWrapper $stapBuild/bin/stap $out/bin/stap \
55-
--add-flags "-r $kernelBuildDir" \
43+
--add-flags "-r ${kernel.dev}" \
5644
--prefix PATH : ${lib.makeBinPath [ stdenv.cc.cc stdenv.cc.bintools elfutils gnumake ]}
5745
makeWrapper $stapBuild/bin/dtrace $out/bin/dtrace \
5846
--prefix PYTHONPATH : ${pypkgs}

0 commit comments

Comments
 (0)