1{2 lib,3 craneLib,4 inputs,56 stdenv,7 pkg-config,8 rustPlatform,9 udev,10}:11let12 system = stdenv.hostPlatform.system;13in14craneLib.buildPackage rec {15 pname = "fleet-usbd";16 src = lib.cleanSourceWith {17 src = ../.;18 filter =19 path: type:20 (lib.hasSuffix "\.cc" path)21 || (lib.hasSuffix "\.hh" path)22 || (craneLib.filterCargoSources path type);23 };24 strictDeps = true;2526 cargoExtraArgs = "--locked -p ${pname}";2728 buildInputs = [29 inputs.nix.packages.${system}.nix-expr-c30 inputs.nix.packages.${system}.nix-flake-c31 inputs.nix.packages.${system}.nix-fetchers-c32 udev33 ];34 nativeBuildInputs = [35 pkg-config36 rustPlatform.bindgenHook37 ];3839 meta.mainProgram = "fleet-usbd";40}