libbpf: 0.1.1 -> 0.4.0

This commit is contained in:
Andreas Rammhold 2021-08-22 14:45:17 +02:00
parent 8d63fae087
commit 1bfa488b1c
No known key found for this signature in database
GPG Key ID: E432E410B5E48C86

View File

@ -7,30 +7,15 @@ with builtins;
stdenv.mkDerivation rec {
pname = "libbpf";
version = "0.1.1";
version = "0.4.0";
src = fetchFromGitHub {
owner = "libbpf";
repo = "libbpf";
rev = "v${version}";
sha256 = "0ilnnm4q22f8fagwp8kb37licy4ks861i2iqh2djsypqhnxvx3fv";
sha256 = "1by5w7g3i2fc10bi6f0j8jqi2nq0x8r973j2qx7qlfryjxr7b2v3";
};
patches = [
(fetchpatch { # included upstream for > 0.1.0
name = "link-zlib.patch";
url = "https://github.com/libbpf/libbpf/commit/8b14cb43ff837.diff";
sha256 = "17mvjrs7s727drz013a8qlyj0345ldi2kph6pazcmxv6kl1qrz2z";
})
];
patchFlags = "-p2";
# https://github.com/libbpf/libbpf/pull/201#issuecomment-689174740
postPatch = ''
substituteInPlace ../scripts/check-reallocarray.sh \
--replace 'mktemp /tmp/' 'mktemp ' \
--replace '/bin/rm' 'rm'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libelf zlib ];