Commit a53f1b94 authored by figsoda's avatar figsoda
Browse files
parent dd353758
Loading
Loading
Loading
Loading
+9 −13
Original line number Diff line number Diff line
{ lib
, rustPlatform
, fetchFromGitHub
, fetchpatch
, nix-update-script
}:

rustPlatform.buildRustPackage rec {
  pname = "cargo-cross";
  version = "0.2.4";
  version = "0.2.5";

  src = fetchFromGitHub {
    owner = "rust-embedded";
    owner = "cross-rs";
    repo = "cross";
    rev = "v${version}";
    sha256 = "sha256-gaY34ziC+ugw/HUTSh0Uk5WBfWMRZLybfpAMkUzsj8g=";
    rev = "refs/tags/v${version}";
    sha256 = "sha256-TFPIQno30Vm5m2nZ2b3d0WPu/98UqANLhw3IZiE5a38=";
  };

  cargoSha256 = "sha256-bdcdlnNr4CdkIJNoo8tb4ohVDmAcKIOP0nRr6BM+EPw=";
  cargoSha256 = "sha256-x+DrKo79R8TAeLVuvIIguQs3gdAHiAQ9dUU2/eZRZ0c=";

  # Fixes https://github.com/cross-rs/cross/issues/943
  cargoPatches = [
    (fetchpatch {
      url = "https://github.com/cross-rs/cross/commit/d639578881d21d28d91d155722201cc53b00c5e7.patch";
      sha256 = "sha256-FWaYIEMonb1Z8g5yXfd/Rl/LnxSYVwLfFIvPY1mJNxU=";
    })
  checkFlags = [
    "--skip=docker::shared::tests::directories::test_host"
  ];

  passthru = {
@@ -32,7 +27,8 @@ rustPlatform.buildRustPackage rec {

  meta = with lib; {
    description = "Zero setup cross compilation and cross testing";
    homepage = "https://github.com/rust-embedded/cross";
    homepage = "https://github.com/cross-rs/cross";
    changelog = "https://github.com/cross-rs/cross/blob/v${version}/CHANGELOG.md";
    license = with licenses; [ asl20 /* or */ mit ];
    maintainers = with maintainers; [ otavio ];
    mainProgram = "cross";