depot/third_party/nixpkgs/pkgs/by-name/pr/probe-rs-tools/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

78 lines
2.9 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
pkg-config,
libusb1,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "probe-rs-tools";
version = "0.27.0";
src = fetchFromGitHub {
owner = "probe-rs";
repo = "probe-rs";
tag = "v${version}";
hash = "sha256-xtUaGJyzr0uQUb/A+7RmOVVgrXIctr2I9gLPU2/rXso=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-acGLTbWI0SHspFISWw5Lj+sqn5HE4du5jTC3NS5zzh8=";
buildAndTestSubdir = pname;
nativeBuildInputs = [
# required by libz-sys, no option for dynamic linking
# https://github.com/rust-lang/libz-sys/issues/158
cmake
pkg-config
];
buildInputs = [
libusb1
openssl
];
checkFlags = [
# require a physical probe
"--skip=cmd::dap_server::server::debugger::test::attach_request"
"--skip=cmd::dap_server::server::debugger::test::attach_with_flashing"
"--skip=cmd::dap_server::server::debugger::test::disassemble::instructions_after_and_not_including_the_ref_address"
"--skip=cmd::dap_server::server::debugger::test::disassemble::instructions_before_and_not_including_the_ref_address_multiple_locations"
"--skip=cmd::dap_server::server::debugger::test::disassemble::instructions_including_the_ref_address_location_cloned_from_earlier_line"
"--skip=cmd::dap_server::server::debugger::test::disassemble::negative_byte_offset_of_exactly_one_instruction_aligned_"
"--skip=cmd::dap_server::server::debugger::test::disassemble::positive_byte_offset_that_lands_in_the_middle_of_an_instruction_unaligned_"
"--skip=cmd::dap_server::server::debugger::test::launch_and_threads"
"--skip=cmd::dap_server::server::debugger::test::launch_with_config_error"
"--skip=cmd::dap_server::server::debugger::test::test_initalize_request"
"--skip=cmd::dap_server::server::debugger::test::test_launch_and_terminate"
"--skip=cmd::dap_server::server::debugger::test::test_launch_no_probes"
"--skip=cmd::dap_server::server::debugger::test::wrong_request_after_init"
# compiles an image for an embedded target which we do not have a toolchain for
"--skip=util::cargo::test::get_binary_artifact_with_cargo_config"
"--skip=util::cargo::test::get_binary_artifact_with_cargo_config_toml"
# requires other crates in the workspace
"--skip=util::cargo::test::get_binary_artifact"
"--skip=util::cargo::test::library_with_example_specified"
"--skip=util::cargo::test::multiple_binaries_in_crate_select_binary"
"--skip=util::cargo::test::workspace_binary_package"
"--skip=util::cargo::test::workspace_root"
];
meta = with lib; {
description = "CLI tool for on-chip debugging and flashing of ARM chips";
homepage = "https://probe.rs/";
changelog = "https://github.com/probe-rs/probe-rs/blob/v${version}/CHANGELOG.md";
license = with licenses; [
asl20 # or
mit
];
maintainers = with maintainers; [
xgroleau
newam
];
};
}