Skip to content

Commit d16bdd4

Browse files
committed
kernel-modules: improve patch phase
1 parent d884eaf commit d16bdd4

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

pkgs/kernel-modules/fwctl/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ stdenv.mkDerivation rec {
2828
nativeBuildInputs = kernel.moduleBuildDependencies;
2929

3030
patchPhase = ''
31-
patchShebangs .
31+
runHook prePatch
3232
33+
patchShebangs .
3334
substituteInPlace ./makefile \
3435
--replace-warn '/bin/ls' 'ls' \
3536
--replace-warn '/bin/bash' '${lib.getExe bash}'
37+
38+
runHook postPatch
3639
'';
3740

3841
enableParallelBuilding = true;

pkgs/kernel-modules/kernel-mft/default.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ stdenv.mkDerivation rec {
2121
nativeBuildInputs = kernel.moduleBuildDependencies;
2222

2323
patchPhase = ''
24+
runHook prePatch
2425
patchShebangs .
26+
runHook postPatch
2527
'';
2628

2729
buildPhase =

pkgs/kernel-modules/mlnx-nfsrdma/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ stdenv.mkDerivation rec {
2828
nativeBuildInputs = kernel.moduleBuildDependencies;
2929

3030
patchPhase = ''
31-
patchShebangs .
31+
runHook prePatch
3232
33+
patchShebangs .
3334
substituteInPlace ./makefile \
3435
--replace-warn '/bin/ls' 'ls' \
3536
--replace-warn '/bin/bash' '${lib.getExe bash}'
37+
38+
runHook postPatch
3639
'';
3740

3841
enableParallelBuilding = true;

pkgs/kernel-modules/mlnx-nvme/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ stdenv.mkDerivation rec {
2828
nativeBuildInputs = kernel.moduleBuildDependencies;
2929

3030
patchPhase = ''
31-
patchShebangs .
31+
runHook prePatch
3232
33+
patchShebangs .
3334
substituteInPlace ./makefile \
3435
--replace-warn '/bin/ls' 'ls' \
3536
--replace-warn '/bin/bash' '${lib.getExe bash}'
37+
38+
runHook postPatch
3639
'';
3740

3841
enableParallelBuilding = true;

pkgs/kernel-modules/mlnx-ofed-kernel/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ stdenv.mkDerivation rec {
3030

3131
patchPhase =
3232
''
33-
patchShebangs .
33+
runHook prePatch
3434
35+
patchShebangs .
3536
substituteInPlace ./ofed_scripts/configure \
3637
--replace-warn '/bin/cp' 'cp' \
3738
--replace-warn '/bin/rm' 'rm'
@@ -47,6 +48,8 @@ stdenv.mkDerivation rec {
4748
--replace-fail '/usr/src/ofa_kernel' '$out/usr/src/ofa_kernel' \
4849
--replace-warn '/bin/cp' 'cp' \
4950
--replace-warn '/bin/rm' 'rm'
51+
52+
runHook postPatch
5053
'';
5154

5255
configureScript = "./configure";

0 commit comments

Comments
 (0)