From 772a6a6e5331ad0f23e5d773bb7d8cef3c1a1c87 Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Sat, 25 Oct 2025 12:52:26 +0000 Subject: [PATCH] models-dev: 0-unstable-2025-10-08 -> 0-unstable-2025-10-24 - Removed patch as it's no longer needed in Bun 1.3.0+ --- pkgs/by-name/mo/models-dev/package.nix | 22 ++++++++++--------- .../post-build-rename-index-file.patch | 18 --------------- 2 files changed, 12 insertions(+), 28 deletions(-) delete mode 100644 pkgs/by-name/mo/models-dev/post-build-rename-index-file.patch diff --git a/pkgs/by-name/mo/models-dev/package.nix b/pkgs/by-name/mo/models-dev/package.nix index 001aff6bbac9..3ddd98aeb6e7 100644 --- a/pkgs/by-name/mo/models-dev/package.nix +++ b/pkgs/by-name/mo/models-dev/package.nix @@ -8,12 +8,12 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "models-dev"; - version = "0-unstable-2025-10-08"; + version = "0-unstable-2025-10-24"; src = fetchFromGitHub { owner = "sst"; repo = "models.dev"; - rev = "8d397086d8971c91b27919b8a3945f5ac21bc61f"; - hash = "sha256-r0k6b9vaAeKZl1mknQc1wyRiJcPB3/OWlqspOgqw/Us="; + rev = "1548a725f07c2c6113379a8c5566c2e4c4dfc91f"; + hash = "sha256-SgZFdjoSlmRS+eMbAIVPsDnwDEmzA/YFhgdHij3Qq38="; }; node_modules = stdenvNoCC.mkDerivation { @@ -37,9 +37,18 @@ stdenvNoCC.mkDerivation (finalAttrs: { export BUN_INSTALL_CACHE_DIR=$(mktemp -d) + # NOTE: Starting with Bun 1.3.0, isolated builds became the default + # behavior. In isolated builds, each package receives its own + # `.node_modules` subdirectory containing only the dependencies + # explicitly declared in that package's `package.json`. Since our build + # process copies only the root-level `.node_modules` directory, we must + # use `--linker=hoisted` to consolidate all dependencies there. Without + # this flag, we would need to copy every individual `.node_modules` + # subdirectory from each package. bun install \ --force \ --frozen-lockfile \ + --linker=hoisted \ --no-progress \ --production @@ -72,13 +81,6 @@ stdenvNoCC.mkDerivation (finalAttrs: { nativeBuildInputs = [ bun ]; - patches = [ - # In bun 1.2.13 (release-25.05) HTML entrypoints get content hashes - # appended → index.html becomes index-pq8vj7za.html in ./dist. So, we - # rename the index file back to index.html - ./post-build-rename-index-file.patch - ]; - configurePhase = '' runHook preConfigure diff --git a/pkgs/by-name/mo/models-dev/post-build-rename-index-file.patch b/pkgs/by-name/mo/models-dev/post-build-rename-index-file.patch deleted file mode 100644 index 2af79dbc92f9..000000000000 --- a/pkgs/by-name/mo/models-dev/post-build-rename-index-file.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git i/packages/web/script/build.ts w/packages/web/script/build.ts -index 9bdcdb3..e9ce1c9 100755 ---- i/packages/web/script/build.ts -+++ w/packages/web/script/build.ts -@@ -14,6 +14,13 @@ for await (const file of new Bun.Glob("./public/*").scan()) { - await Bun.write(file.replace("./public/", "./dist/"), Bun.file(file)); - } - -+const distFiles = await fs.readdir("./dist"); -+const htmlFile = distFiles.find(file => file.startsWith("index-") && file.endsWith(".html")); -+ -+if (htmlFile) { -+ await fs.rename(`./dist/${htmlFile}`, "./dist/index.html"); -+} -+ - let html = await Bun.file("./dist/index.html").text(); - html = html.replace("", Rendered); - await Bun.write("./dist/index.html", html);