summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-04-25 07:30:18 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-04-25 07:30:18 +0100
commite205b43f47a435ddff30a97d46cd6a1c0b098f9b (patch)
tree844b0bc2e4aafca49dac68191573a39a492751ef
parente2e676d8cd4d5d3f27bf9c2f2bd52cf2098b1a3f (diff)
downloadnixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.tar
nixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.tar.gz
nixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.tar.bz2
nixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.tar.lz
nixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.tar.xz
nixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.tar.zst
nixpkgs-e205b43f47a435ddff30a97d46cd6a1c0b098f9b.zip
linuxPackages_latest.perf: fix python shebangs on 6.3+
Without the change `perf` build fails as:

    sh: line 1: pmu-events/metric_test.py: cannot execute: required file not found
    make[3]: *** [pmu-events/Build:32: pmu-events/metric_test.log] Error 1

Full build log: https://hydra.nixos.org/log/mp5a0fr1jhw3rvkp8azbh5xh0g1cjqhj-perf-linux-6.3.drv
-rw-r--r--pkgs/os-specific/linux/kernel/perf/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix
index bd9bd6d95db..1ae1bae26fd 100644
--- a/pkgs/os-specific/linux/kernel/perf/default.nix
+++ b/pkgs/os-specific/linux/kernel/perf/default.nix
@@ -64,6 +64,10 @@ stdenv.mkDerivation {
     # Linux scripts
     patchShebangs scripts
 
+  '' + lib.optionalString (lib.versionAtLeast kernel.version "6.3") ''
+    # perf-specific scripts
+    patchShebangs tools/perf/pmu-events
+  '' + ''
     cd tools/perf
 
     for x in util/build-id.c util/dso.c; do