11 rustPlatform.buildRustPackage rec {
15 src = fetchFromGitHub {
18 rev = "refs/tags/v${version}";
19 hash = "sha256-CRYp1ktmmY4OS23+LNKOBQJUMkd+GXptBp5LPfbyZAc=";
23 lockFile = ./Cargo.lock;
25 "compiletest_rs-0.10.2" = "sha256-JTfVfMW0bCbFjQxeAFu3Aex9QmGnx0wp6weGrNlQieA=";
29 buildNoDefaultFeatures = true;
31 nativeBuildInputs = [ llvmPackages_19.llvm ];
32 buildInputs = [ zlib ncurses libxml2 ];
34 # fails with: couldn't find crate `core` with expected target triple bpfel-unknown-none
35 # rust-src and `-Z build-std=core` are required to properly run the tests
39 description = "Simple BPF static linker";
40 mainProgram = "bpf-linker";
41 homepage = "https://github.com/aya-rs/bpf-linker";
42 license = with licenses; [ asl20 mit ];
43 maintainers = with maintainers; [ nickcao ];
44 # llvm-sys crate locates llvm by calling llvm-config
45 # which is not available when cross compiling
46 broken = stdenv.buildPlatform != stdenv.hostPlatform;