summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/perf
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2023-08-06 20:22:09 +0100
committerSergei Trofimovich <slyich@gmail.com>2023-08-06 20:22:09 +0100
commit0768fe799a7999f2d9cd19ec8707db2d5bec93ac (patch)
treeddfec1735ec79d90be0bd54e0e32a325d2c6dcd6 /pkgs/os-specific/linux/kernel/perf
parent4b68f2cde57decc57a539778b37d0dffd81af068 (diff)
downloadnixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.tar
nixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.tar.gz
nixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.tar.bz2
nixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.tar.lz
nixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.tar.xz
nixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.tar.zst
nixpkgs-0768fe799a7999f2d9cd19ec8707db2d5bec93ac.zip
linuxPackages_testing.perf: fix patchShebang
Without the change `perf` build fails as:

    $ nix build --no-link -f. linuxPackages_testing.perf -L

    build flags: SHELL=/nix/store/p6dlr3skfhxpyphipg2bqnj52999banh-bash-5.2-p15/bin/bash prefix=\$\(out\) WERROR=0 ASCIIDOC8=1 O=\$\(buildRoot\) CC=/nix/store/bxic6j2whyg3z4h2x3xjyqgp7fl83bnp-gcc-wrapper-12.3.0/bin/cc HOSTCC=/nix/store/bxic6j2whyg3z4h2x3xjyqgp7fl83bnp-gcc-wrapper-12.3.0/bin/cc HOSTLD=/nix/store/kcp78dk7h5gcs7d4qss7rbz3skxhzdnn-binutils-wrapper-2.40/bin/ld ARCH=x86_64 NO_GTK2=1
      BUILD:   Doing 'make -j16' parallel build
      HOSTCC  fixdep.o
      HOSTLD  fixdep-in.o
      LINK    fixdep
    make[1]: ./check-headers.sh: No such file or directory
    make[1]: *** [Makefile.perf:241: sub-make] Error 127
    make: *** [Makefile:70: all] Error 2

This started happening because upstream linux commit
    https://github.com/torvalds/linux/commit/d6748385098a8333a0e1c7e2d77119c919776728
changed shebang from /bin/sh to /bin/bash.

Let's retroactively switch all `perf` releases to shell interpreter from
store.
Diffstat (limited to 'pkgs/os-specific/linux/kernel/perf')
-rw-r--r--pkgs/os-specific/linux/kernel/perf/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix
index 620ecfc43df..2fc82b2e10b 100644
--- a/pkgs/os-specific/linux/kernel/perf/default.nix
+++ b/pkgs/os-specific/linux/kernel/perf/default.nix
@@ -63,7 +63,7 @@ stdenv.mkDerivation {
   postPatch = ''
     # Linux scripts
     patchShebangs scripts
-
+    patchShebangs tools/perf/check-headers.sh
   '' + lib.optionalString (lib.versionAtLeast kernel.version "6.3") ''
     # perf-specific scripts
     patchShebangs tools/perf/pmu-events