Merge pull request #61822 from thoughtpolice/nixpkgs/add-libbpf

libbpf: init at 0.0.3pre114_672ae75
This commit is contained in:
Austin Seipp 2019-05-22 14:19:25 -05:00 committed by GitHub
commit fefcb29476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,43 @@
{ stdenv, fetchFromGitHub, pkgconfig
, libelf
}:
with builtins;
stdenv.mkDerivation rec {
name = "libbpf-${version}";
version = "0.0.3pre114_${substring 0 7 src.rev}";
src = fetchFromGitHub {
owner = "libbpf";
repo = "libbpf";
rev = "672ae75b66fd8780a4214fe7b116c427e0809a52";
sha256 = "1bdw1hc4m95irmybqlwax85b6m856g07p2slcw8b7jw3k4j9x075";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libelf ];
sourceRoot = "source/src";
enableParallelBuilding = true;
makeFlags = [ "PREFIX=$(out)" ];
patchPhase = ''
substituteInPlace ../scripts/check-reallocarray.sh \
--replace '/bin/rm' 'rm'
'';
# FIXME: Multi-output requires some fixes to the way the pkgconfig file is
# constructed (it gets put in $out instead of $dev for some reason, with
# improper paths embedded). Don't enable it for now.
# outputs = [ "out" "dev" ];
meta = with stdenv.lib; {
description = "Upstream mirror of libbpf";
homepage = "https://github.com/libbpf/libbpf";
license = with licenses; [ lgpl21 /* or */ bsd2 ];
maintainers = with maintainers; [ thoughtpolice ];
platforms = platforms.linux;
};
}

View File

@ -8858,6 +8858,8 @@ in
buildkite-agent2 = callPackage ../development/tools/continuous-integration/buildkite-agent/2.x.nix { };
buildkite-agent3 = callPackage ../development/tools/continuous-integration/buildkite-agent/3.x.nix { };
libbpf = callPackage ../os-specific/linux/libbpf { };
bpftool = callPackage ../os-specific/linux/bpftool { };
byacc = callPackage ../development/tools/parsing/byacc { };