Merge pull request #188122 from trofi/bpftools-fix-for-binutils-2.39

bpftools: use binutils-2.38 for linux before 5.19
This commit is contained in:
Sergei Trofimovich
2022-08-24 19:49:35 +01:00
committed by GitHub
+8 -3
View File
@@ -1,15 +1,20 @@
{ lib, stdenv
, libopcodes, libbfd, elfutils, readline
, libopcodes, libopcodes_2_38
, libbfd, libbfd_2_38
, elfutils, readline
, linuxPackages_latest, zlib
, python3, bison, flex
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "bpftools";
inherit (linuxPackages_latest.kernel) version src;
nativeBuildInputs = [ python3 bison flex ];
buildInputs = [ libopcodes libbfd elfutils zlib readline ];
buildInputs = (if (lib.versionAtLeast version "5.20")
then [ libopcodes libbfd ]
else [ libopcodes_2_38 libbfd_2_38 ])
++ [ elfutils zlib readline ];
preConfigure = ''
patchShebangs scripts/bpf_doc.py