diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index 52715ab34c01..709312ebdcdf 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -70,7 +70,7 @@ stdenv.mkDerivation { postPatch = '' patchShebangs scripts tools/perf/pmu-events/jevents.py - + '' + lib.optionalString (lib.versionAtLeast kernel.version "5.8") '' substituteInPlace tools/perf/scripts/python/flamegraph.py \ --replace "/usr/share/d3-flame-graph/d3-flamegraph-base.html" \ "${d3-flame-graph-templates}/share/d3-flame-graph/d3-flamegraph-base.html"