mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-17 17:58:35 +00:00
Merge #154321: libbpf: Fix musl build (into staging-next)
This commit is contained in:
commit
4c54621dbb
@ -21,12 +21,16 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-/MLPflnfooe7Wjy8M3CTowAi5oYpscruSkDsaVzhmYQ=";
|
||||
};
|
||||
|
||||
patches = [(fetchpatch {
|
||||
url = "https://github.com/libbpf/libbpf/pull/41.diff";
|
||||
sha256 = "sha256-pg5WARqh6z0nkTHMBhftxwdV2SyswC2lfaCXCpez0VA=";
|
||||
})];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libelf zlib ];
|
||||
|
||||
sourceRoot = "source/src";
|
||||
enableParallelBuilding = true;
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
makeFlags = [ "PREFIX=$(out)" "-C src" ];
|
||||
|
||||
passthru.tests = {
|
||||
bpf = nixosTests.bpf;
|
||||
@ -34,7 +38,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = ''
|
||||
# install linux's libbpf-compatible linux/btf.h
|
||||
install -Dm444 ../include/uapi/linux/btf.h -t $out/include/linux
|
||||
install -Dm444 include/uapi/linux/btf.h -t $out/include/linux
|
||||
'';
|
||||
|
||||
# FIXME: Multi-output requires some fixes to the way the pkg-config file is
|
||||
|
Loading…
Reference in New Issue
Block a user