mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
perf(nix): stamp the commit only into the final Windows package
COMMIT_HASH was in commonArgs, so buildDepsOnly (about 1000 dependencies) and every check (clippy, nextest, fmt, deny) got a new derivation for every commit, even a docs-only one, and rebuilt in full. commonArgs now carries the constant "nix-check" (as the KDE flake already does) and only fullBuild, and so packages.default and the extracted binaries, gets the real commit. The e2e build keeps its own constant through the existing `commit` argument. Nothing the checks compile or test changes; only the string shadow_rs stamps into the check binaries. Verified (nix eval of drvPath in a throwaway git copy, 7 commits): the deps derivation is identical for a docs edit, a Windows source edit, another docs edit, a bar-core edit and a KDE-crate edit; clippy, nextest and fmt are unchanged by the docs edit and change only for source edits; packages.default changes with every commit (real commit embedded). Not verified by a build: needs one idle-host nix build (commands in tools/README.md).
This commit is contained in:
1 parent
633e7453cd
commit
f861a03adb
1 file changed
+4
-1
@@ -235,7 +235,9 @@
|
||||
# komorebic/build.rs downloads applications.json if it is missing, which
|
||||
# is not possible in the sandbox, so provide the pinned copy instead
|
||||
preBuild = "mkdir -p komorebic && cp ${inputs.asc}/applications.json komorebic/applications.json";
|
||||
COMMIT_HASH = commit;
|
||||
# a constant, so that the dependencies and every check are the same
|
||||
# derivations for every commit; only fullBuild stamps the real one
|
||||
COMMIT_HASH = "nix-check";
|
||||
|
||||
# build inputs for cross-compilation
|
||||
nativeBuildInputs = [
|
||||
@@ -278,6 +280,7 @@
|
||||
individualCrateArgs
|
||||
// {
|
||||
pname = "komorebi-workspace";
|
||||
COMMIT_HASH = commit;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user