11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
19 hash = "sha256-LEZ2to1bzJ/H/XYytuh/7NT7+04aI8chpKIFxxVzM+4=";
22 cargoHash = "sha256-s8cW7lXtvgemuQueTtAywewnDVJ/WDcz8SBqsC/tO80=";
24 buildNoDefaultFeatures = true;
25 buildFeatures = [ "system-llvm" ];
27 nativeBuildInputs = [ llvmPackages_15.llvm ];
28 buildInputs = [ zlib ncurses libxml2 ];
30 # fails with: couldn't find crate `core` with expected target triple bpfel-unknown-none
31 # rust-src and `-Z build-std=core` are required to properly run the tests
35 description = "Simple BPF static linker";
36 mainProgram = "bpf-linker";
37 homepage = "https://github.com/aya-rs/bpf-linker";
38 license = with licenses; [ asl20 mit ];
39 maintainers = with maintainers; [ nickcao ];
40 # llvm-sys crate locates llvm by calling llvm-config
41 # which is not available when cross compiling
42 broken = stdenv.buildPlatform != stdenv.hostPlatform;