about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/libbpf
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-06-12 09:59:45 +0000
committerAlyssa Ross <hi@alyssa.is>2019-06-18 18:14:17 +0000
commitc5571a126859eb658ffd7340cb580f7d91f12bb6 (patch)
tree577573c3bf14d9849246d52daece719a10eaf138 /nixpkgs/pkgs/os-specific/linux/libbpf
parent828bd4e8ddcbcd354ddfd99f55af69ee8ff5d9e7 (diff)
parent98e3b90b6c8f400ae5438ef868eb992a64b75ce5 (diff)
downloadnixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.tar
nixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.tar.gz
nixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.tar.bz2
nixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.tar.lz
nixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.tar.xz
nixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.tar.zst
nixlib-c5571a126859eb658ffd7340cb580f7d91f12bb6.zip
Merge commit '98e3b90b6c8f400ae5438ef868eb992a64b75ce5'
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/libbpf')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/libbpf/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix b/nixpkgs/pkgs/os-specific/linux/libbpf/default.nix
new file mode 100644
index 000000000000..a23c0cb09269
--- /dev/null
+++ b/nixpkgs/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;
+  };
+}