2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchpatch
|
|
|
|
, nix-update-script
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-cross";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "0.2.4";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rust-embedded";
|
|
|
|
repo = "cross";
|
|
|
|
rev = "v${version}";
|
2022-07-18 16:21:45 +00:00
|
|
|
sha256 = "sha256-gaY34ziC+ugw/HUTSh0Uk5WBfWMRZLybfpAMkUzsj8g=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
cargoSha256 = "sha256-bdcdlnNr4CdkIJNoo8tb4ohVDmAcKIOP0nRr6BM+EPw=";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
# Fixes https://github.com/cross-rs/cross/issues/943
|
2021-03-09 03:18:52 +00:00
|
|
|
cargoPatches = [
|
|
|
|
(fetchpatch {
|
2022-07-18 16:21:45 +00:00
|
|
|
url = "https://github.com/cross-rs/cross/commit/d639578881d21d28d91d155722201cc53b00c5e7.patch";
|
|
|
|
sha256 = "sha256-FWaYIEMonb1Z8g5yXfd/Rl/LnxSYVwLfFIvPY1mJNxU=";
|
2021-03-09 03:18:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Zero setup cross compilation and cross testing";
|
|
|
|
homepage = "https://github.com/rust-embedded/cross";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ otavio ];
|
2021-09-22 15:38:15 +00:00
|
|
|
mainProgram = "cross";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
}
|