mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-29 11:47:56 +00:00
Support NetBSD/aarch64 (#23616)
I could trivially port Nim to NetBSD/aarch64 because it already
supported NetBSD and aarch64. I only needed to generate `c_code` for
this combination.
(cherry picked from commit 0ba932132e)
This commit is contained in:
@@ -128,6 +128,7 @@ type
|
||||
|
||||
BSD
|
||||
FreeBSD
|
||||
NetBSD
|
||||
OpenBSD
|
||||
DragonFlyBSD
|
||||
|
||||
@@ -169,7 +170,7 @@ proc detectOsImpl(d: Distribution): bool =
|
||||
else:
|
||||
when defined(bsd):
|
||||
case d
|
||||
of Distribution.FreeBSD, Distribution.OpenBSD:
|
||||
of Distribution.FreeBSD, Distribution.NetBSD, Distribution.OpenBSD:
|
||||
result = $d in uname()
|
||||
else:
|
||||
result = false
|
||||
@@ -252,7 +253,7 @@ proc foreignDepInstallCmd*(foreignPackageName: string): (string, bool) =
|
||||
result = ("nix-env -i " & p, false)
|
||||
elif detectOs(Solaris) or detectOs(FreeBSD):
|
||||
result = ("pkg install " & p, true)
|
||||
elif detectOs(OpenBSD):
|
||||
elif detectOs(NetBSD) or detectOs(OpenBSD):
|
||||
result = ("pkg_add " & p, true)
|
||||
elif detectOs(PCLinuxOS):
|
||||
result = ("rpm -ivh " & p, true)
|
||||
|
||||
Reference in New Issue
Block a user