diff --git a/libs/lua53/lua53-src/src/lstate.c b/libs/lua53/lua53-src/src/lstate.c
index c1a76643..c67141f1 100644
--- a/libs/lua53/lua53-src/src/lstate.c
+++ b/libs/lua53/lua53-src/src/lstate.c
@@ -12,6 +12,7 @@
 
 #include <stddef.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include "lua.h"
 
@@ -296,6 +297,8 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
   int i;
   lua_State *L;
   global_State *g;
+  const char *enable_source_date_epoch = getenv("FORCE_SOURCE_DATE");
+  const char *fixed_seed = getenv("SOURCE_DATE_EPOCH");
   LG *l = cast(LG *, (*f)(ud, NULL, LUA_TTHREAD, sizeof(LG)));
   if (l == NULL) return NULL;
   L = &l->l.l;
@@ -308,7 +311,11 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
   g->frealloc = f;
   g->ud = ud;
   g->mainthread = L;
-  g->seed = makeseed(L);
+  if (enable_source_date_epoch && !strcmp(enable_source_date_epoch, "1") && fixed_seed) {
+    g->seed = strtoull(fixed_seed, NULL, 10);
+  } else {
+    g->seed = makeseed(L);
+  }
   g->gcrunning = 0;  /* no GC while building state */
   g->GCestimate = 0;
   g->strt.size = g->strt.nuse = 0;
