Commit c0eb2466 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

argc: add passthru.tests.cross

parent 60949c89
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
{
  lib,
  buildPackages,
  pkgsCross,
  rustPlatform,
  stdenv,
  fetchFromGitHub,
@@ -36,6 +37,20 @@ rustPlatform.buildRustPackage rec {

  disallowedReferences = lib.optional (!canExecuteHost) buildPackages.argc;

  passthru = {
    tests = {
      cross =
        (
          if stdenv.hostPlatform.isDarwin then
            if stdenv.hostPlatform.isAarch64 then pkgsCross.x86_64-darwin else pkgsCross.aarch64-darwin
          else if stdenv.hostPlatform.isAarch64 then
            pkgsCross.gnu64
          else
            pkgsCross.aarch64-multiplatform
        ).argc;
    };
  };

  meta = with lib; {
    description = "Command-line options, arguments and sub-commands parser for bash";
    mainProgram = "argc";