mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
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
|
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 ];
|
pypkgs = with python3.pkgs; makePythonPath [ pyparsing ];
|
||||||
|
|
||||||
in runCommand "systemtap-${kernel.version}-${version}" {
|
in runCommand "systemtap-${kernel.version}-${version}" {
|
||||||
inherit stapBuild kernelBuildDir;
|
inherit stapBuild;
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://sourceware.org/systemtap/";
|
homepage = "https://sourceware.org/systemtap/";
|
||||||
@ -52,7 +40,7 @@ in runCommand "systemtap-${kernel.version}-${version}" {
|
|||||||
done
|
done
|
||||||
rm $out/bin/stap $out/bin/dtrace
|
rm $out/bin/stap $out/bin/dtrace
|
||||||
makeWrapper $stapBuild/bin/stap $out/bin/stap \
|
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 ]}
|
--prefix PATH : ${lib.makeBinPath [ stdenv.cc.cc stdenv.cc.bintools elfutils gnumake ]}
|
||||||
makeWrapper $stapBuild/bin/dtrace $out/bin/dtrace \
|
makeWrapper $stapBuild/bin/dtrace $out/bin/dtrace \
|
||||||
--prefix PYTHONPATH : ${pypkgs}
|
--prefix PYTHONPATH : ${pypkgs}
|
||||||
|
Loading…
Reference in New Issue
Block a user