Files
nixpkgs/pkgs/by-name/bp/bpf-linker/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.1 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
btfdump,
rustc,
zlib,
libxml2,
}:
rustPlatform.buildRustPackage rec {
pname = "bpf-linker";
version = "0.9.15";
src = fetchFromGitHub {
owner = "aya-rs";
repo = "bpf-linker";
tag = "v${version}";
hash = "sha256-5HXYtAn6KaFXsiA3Nt0IwmFLOXBhZWYrD8cMZ8rZ1fk=";
};
cargoHash = "sha256-coIcd6WjVQM/b51jwkG8It/wubXx6wuuPlzzelPFE38=";
buildNoDefaultFeatures = true;
buildFeatures = [ "llvm-${lib.versions.major rustc.llvm.version}" ];
nativeBuildInputs = [ rustc.llvm ];
buildInputs = [
zlib
libxml2
];
nativeCheckInputs = [
btfdump
rustc.llvmPackages.clang.cc
];
meta = {
description = "Simple BPF static linker";
mainProgram = "bpf-linker";
homepage = "https://github.com/aya-rs/bpf-linker";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ nickcao ];
# llvm-sys crate locates llvm by calling llvm-config
# which is not available when cross compiling
broken = stdenv.buildPlatform != stdenv.hostPlatform;
};
}