|
621 | 621 | else |
622 | 622 | null; |
623 | 623 | }; |
| 624 | + |
| 625 | + nim = { |
| 626 | + # See these locations for a known list of cpu/os idntifeiers: |
| 627 | + # - https://nim-lang.org/docs/system.html#hostCPU |
| 628 | + # - https://nim-lang.org/docs/system.html#hostOS |
| 629 | + cpu = |
| 630 | + if final.isAarch32 then |
| 631 | + "arm" |
| 632 | + else if final.isAarch64 then |
| 633 | + "arm64" |
| 634 | + else if final.isAlpha then |
| 635 | + "alpha" |
| 636 | + else if final.isAvr then |
| 637 | + "avr" |
| 638 | + else if final.isMips && final.is32Bit then |
| 639 | + "mips" |
| 640 | + else if final.isMips && final.is64Bit then |
| 641 | + "mips64" |
| 642 | + else if final.isMsp430 then |
| 643 | + "msp430" |
| 644 | + else if final.isPower && final.is32bit then |
| 645 | + "powerpc" |
| 646 | + else if final.isPower && final.is64bit then |
| 647 | + "powerpc64" |
| 648 | + else if final.isRiscV && final.is64bit then |
| 649 | + "riscv64" |
| 650 | + else if final.isSparc then |
| 651 | + "sparc" |
| 652 | + else if final.isx86_32 then |
| 653 | + "i386" |
| 654 | + else if final.isx86_64 then |
| 655 | + "amd64" |
| 656 | + else |
| 657 | + null; |
| 658 | + os = |
| 659 | + if final.isAndroid then |
| 660 | + "Android" |
| 661 | + else if final.isDarwin then |
| 662 | + "MacOSX" |
| 663 | + else if final.isFreeBSD then |
| 664 | + "FreeBSD" |
| 665 | + else if final.isGenode then |
| 666 | + "Genode" |
| 667 | + else if final.isLinux then |
| 668 | + "Linux" |
| 669 | + else if final.isNetBSD then |
| 670 | + "NetBSD" |
| 671 | + else if final.isNone then |
| 672 | + "Standalone" |
| 673 | + else if final.isOpenBSD then |
| 674 | + "OpenBSD" |
| 675 | + else if final.isWindows then |
| 676 | + "Windows" |
| 677 | + else if final.isiOS then |
| 678 | + "iOS" |
| 679 | + else |
| 680 | + null; |
| 681 | + }; |
624 | 682 | }; |
625 | 683 | in |
626 | 684 | assert final.useAndroidPrebuilt -> final.isAndroid; |
|
0 commit comments