systemtap: remove hack, fix build
This commit is contained in:
parent
060cf0dc34
commit
53539903ff
|
@ -22,22 +22,10 @@ let
|
|||
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=deprecated-declarations" ]; # Needed with GCC 12
|
||||
};
|
||||
|
||||
## a kernel build dir as expected by systemtap
|
||||
kernelBuildDir = runCommand "kbuild-${kernel.version}-merged" { } ''
|
||||
mkdir -p $out
|
||||
for f in \
|
||||
${kernel}/System.map \
|
||||
${kernel.dev}/vmlinux \
|
||||
${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/{*,.*}
|
||||
do
|
||||
ln -s $(readlink -f $f) $out
|
||||
done
|
||||
'';
|
||||
|
||||
pypkgs = with python3.pkgs; makePythonPath [ pyparsing ];
|
||||
|
||||
in runCommand "systemtap-${kernel.version}-${version}" {
|
||||
inherit stapBuild kernelBuildDir;
|
||||
inherit stapBuild;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
meta = {
|
||||
homepage = "https://sourceware.org/systemtap/";
|
||||
|
@ -52,7 +40,7 @@ in runCommand "systemtap-${kernel.version}-${version}" {
|
|||
done
|
||||
rm $out/bin/stap $out/bin/dtrace
|
||||
makeWrapper $stapBuild/bin/stap $out/bin/stap \
|
||||
--add-flags "-r $kernelBuildDir" \
|
||||
--add-flags "-r ${kernel.dev}" \
|
||||
--prefix PATH : ${lib.makeBinPath [ stdenv.cc.cc stdenv.cc.bintools elfutils gnumake ]}
|
||||
makeWrapper $stapBuild/bin/dtrace $out/bin/dtrace \
|
||||
--prefix PYTHONPATH : ${pypkgs}
|
||||
|
|
Loading…
Reference in a new issue