-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pagefind: init at 1.0.3 #247773
pagefind: init at 1.0.3 #247773
Conversation
wasm-bindgen-84 = wasm-bindgen-cli.override { | ||
version = "0.2.84"; | ||
hash = "sha256-0rK+Yx4/Jy44Fw5VwJ3tG243ZsyOIBBehYU54XP/JGk="; | ||
cargoHash = "sha256-vcpxcRlW1OKoD64owFF6mkxSqmNrvY+y3Ckn5UwEQ50="; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect overrideAttrs
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intuitively i would agree, but updating hashes in fetchers is a chore, and .override
was enabled here: b691051
# https://github.com/NixOS/nixpkgs/issues/89426 | ||
rustc-wasm32 = (rustc.override { | ||
stdenv = stdenv.override { | ||
targetPlatform = stdenv.targetPlatform // { | ||
parsed = { | ||
cpu.name = "wasm32"; | ||
vendor.name = "unknown"; | ||
kernel.name = "unknown"; | ||
abi.name = "unknown"; | ||
}; | ||
}; | ||
}; | ||
}).overrideAttrs (old: { | ||
configureFlags = old.configureFlags ++ ["--set=build.docs=false"]; | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nixos/rust: Any one of you opposed to this? It's already in cache thanks to lldap
.
Context: #89426
e6fba28
to
a463905
Compare
env.npmDeps_web_js = fetchNpmDeps { | ||
src = "${src}/pagefind_web_js"; | ||
hash = "sha256-pGE4lUFZ4dA++8kBklcMBoaN/1Z92dfOzQKhukbuEyc="; | ||
}; | ||
env.npmDeps_ui_default = fetchNpmDeps { | ||
src = "${src}/pagefind_ui/default"; | ||
hash = "sha256-voCs49JneWYE1W9U7aB6G13ypH6JqathVDeF58V57U8="; | ||
}; | ||
env.npmDeps_ui_modular = fetchNpmDeps { | ||
src = "${src}/pagefind_ui/modular"; | ||
hash = "sha256-O0RqZUsRFtByxMQdwNGNcN38Rh+sDqqNo9YlBcrnsF4="; | ||
}; | ||
|
||
postPatch = '' | ||
# Tricky way to run npmConfigHook multiple times | ||
( | ||
local postPatchHooks=() # written to by npmConfigHook | ||
source ${npmHooks.npmConfigHook}/nix-support/setup-hook | ||
npmRoot=pagefind_web_js npmDeps=$npmDeps_web_js npmConfigHook | ||
npmRoot=pagefind_ui/default npmDeps=$npmDeps_ui_default npmConfigHook | ||
npmRoot=pagefind_ui/modular npmDeps=$npmDeps_ui_modular npmConfigHook | ||
) | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I copied this comment from the old commit before the bump to v1.0.0)
@winterqt Would you consider this pattern for building multiple npm projects sound, or should it be torched? I do not want to establish a bad precedent.
This forcepush bumps the version to 1.0.0. 🚀 Due to a git dependency i was force to vendor the lock, tracked in CloudCannon/pagefind#421 |
a463905
to
940521c
Compare
This force push bumps the version to 1.0.2, removing the need to vendor the cargo lock file. I also set different names to each npm-dep, making it far easier to update their hashes. @ofborg build pagefind |
940521c
to
dba7f37
Compare
LGTM, I have nothing to add. |
dba7f37
to
095afd8
Compare
I have built and run this on aarch64-darwin. It seems to work well. |
ofborg seems to have problems with aarch64-darwin https://logs.ofborg.org/?key=nixos/nixpkgs.247773&attempt_id=23427e33-a91f-4bc2-8ff7-dcf32dd84710 |
095afd8
to
35b7389
Compare
Description of changes
This PR packages pagefind by @CloudCannon (pagefind source), which can generate a low-bandwidth search index for nearly any static website. I've tested the use case documented here on a huge HTML soup, and it worked wonders.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)