Skip to content

Commit 13bc1b5

Browse files
authored
pagefind: fix --version output (#409621)
2 parents a0c9547 + ba7e1d7 commit 13bc1b5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkgs/applications/misc/pagefind/default.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
npmHooks,
1313
python3,
1414
rustc,
15+
versionCheckHook,
1516
wasm-bindgen-cli_0_2_92,
1617
wasm-pack,
1718
}:
@@ -65,7 +66,12 @@ rustPlatform.buildRustPackage rec {
6566
hash = "sha256-xFVMWX3q3za1w8v58Eysk6vclPd4qpCuQMjMcwwHoh0=";
6667
};
6768

69+
env.GIT_VERSION = version;
70+
6871
postPatch = ''
72+
# Set the correct version, e.g. for `pagefind --version`
73+
node .backstage/version.cjs
74+
6975
# Tricky way to run npmConfigHook multiple times
7076
(
7177
local postPatchHooks=() # written to by npmConfigHook
@@ -163,6 +169,12 @@ rustPlatform.buildRustPackage rec {
163169

164170
buildFeatures = [ "extended" ];
165171

172+
doInstallCheck = true;
173+
174+
nativeInstallCheckInputs = [
175+
versionCheckHook
176+
];
177+
166178
meta = {
167179
description = "Generate low-bandwidth search index for your static website";
168180
homepage = "https://pagefind.app/";

0 commit comments

Comments
 (0)