Index: patches/patch-dist_nimble_src_nimblepkg_downloadnim_nim
===================================================================
RCS file: patches/patch-dist_nimble_src_nimblepkg_downloadnim_nim
diff -N patches/patch-dist_nimble_src_nimblepkg_downloadnim_nim
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-dist_nimble_src_nimblepkg_downloadnim_nim	5 Jun 2025 06:03:23 -0000
@@ -0,0 +1,12 @@
+Index: dist/nimble/src/nimblepkg/downloadnim.nim
+--- dist/nimble/src/nimblepkg/downloadnim.nim.orig
++++ dist/nimble/src/nimblepkg/downloadnim.nim
+@@ -140,6 +140,8 @@ proc getNightliesUrl*(parsedContents: JsonNode, arch: 
+       "osx"
+     elif defined(freebsd):
+       "freebsd"
++    elif defined(openbsd):
++      "openbsd"
+   for jn in parsedContents.getElems():
+     if jn["name"].getStr().contains("devel"):
+       let tagName = jn{"tag_name"}.getStr("")
Index: patches/patch-lib_posix_posix_nim
===================================================================
RCS file: patches/patch-lib_posix_posix_nim
diff -N patches/patch-lib_posix_posix_nim
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_posix_posix_nim	5 Jun 2025 06:03:23 -0000
@@ -0,0 +1,15 @@
+Index: lib/posix/posix.nim
+--- lib/posix/posix.nim.orig
++++ lib/posix/posix.nim
+@@ -215,6 +215,11 @@ when defined(osx):              # 2001 POSIX evidently
+     # present size & has no good reason to call this unless it is growing.
+     if fcntl(a1, F_PREALLOCATE, fst.addr) != cint(-1): ftruncate(a1, a2 + a3)
+     else: cint(-1)
++elif defined(openbsd):
++  proc posix_fallocate*(a1: cint, a2, a3: Off): cint =
++    # above assumption: "has no good reason to call this unless it is growing."
++    # man ftruncate "it will be extended as if by writing bytes with the value zero."
++    return ftruncate(a1, a2 + a3)
+ else:
+   proc posix_fallocate*(a1: cint, a2, a3: Off): cint {.
+     importc, header: "<fcntl.h>".}
