argc: add passthru.tests.cross

This commit is contained in:
Yueh-Shun Li
2024-05-04 03:29:57 +08:00
parent 60949c89cd
commit c0eb246672
+15
View File
@@ -1,6 +1,7 @@
{
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";