models-dev: 0-unstable-2025-10-08 -> 0-unstable-2025-10-24 (#455544)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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("<!--static-->", Rendered);
|
||||
await Bun.write("./dist/index.html", html);
|
||||
Reference in New Issue
Block a user