diff options
author | Austin Seipp <aseipp@pobox.com> | 2019-05-21 13:06:36 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2019-05-21 13:06:36 -0500 |
commit | dee55b0e6618661b0e9be07f51b90141fb8750e2 (patch) | |
tree | 6d254803a34f3bd74c1dd2a96c2742ec893be848 /pkgs/os-specific/linux/libbpf/default.nix | |
parent | 3354bd90a1e97adc98c87fefe9bb3c54bb813c5b (diff) | |
download | nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.tar nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.tar.gz nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.tar.bz2 nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.tar.lz nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.tar.xz nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.tar.zst nixpkgs-dee55b0e6618661b0e9be07f51b90141fb8750e2.zip |
libbpf: init at 0.0.3pre114_672ae75
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/os-specific/linux/libbpf/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/libbpf/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/libbpf/default.nix b/pkgs/os-specific/linux/libbpf/default.nix new file mode 100644 index 00000000000..a23c0cb0926 --- /dev/null +++ b/pkgs/os-specific/linux/libbpf/default.nix @@ -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; + }; +} |