refactor(web/bubblegum): only rebuild examples on dependency change
Using sparseTree we can make a (surprisingly long) list of things from depot the examples depend on and create a stripped down depot version which only contains them. As a result the examples are no longer rebuilt on every commit. Change-Id: I3693570ca4bdbbf9da795e552f278f3b1b1b77a9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3504 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
23dd8067c5
commit
3a8925239a
1 changed files with 20 additions and 1 deletions
|
@ -6,8 +6,27 @@ let
|
|||
runExecline
|
||||
getBins
|
||||
utils
|
||||
sparseTree
|
||||
;
|
||||
|
||||
minimalDepot = sparseTree depot.path [
|
||||
# general depot things
|
||||
(depot.path + "/default.nix")
|
||||
(depot.path + "/nix/readTree")
|
||||
# nixpkgs for lib and packages
|
||||
(depot.path + "/third_party/nixpkgs")
|
||||
(depot.path + "/third_party/overlays")
|
||||
# bubblegum and its dependencies
|
||||
(depot.path + "/web/bubblegum")
|
||||
(depot.path + "/nix/runExecline")
|
||||
(depot.path + "/nix/utils")
|
||||
(depot.path + "/nix/sparseTree")
|
||||
# tvix docs for svg demo
|
||||
(depot.path + "/tvix/docs")
|
||||
# for blog.nix
|
||||
(depot.path + "/users/sterni/nix")
|
||||
];
|
||||
|
||||
statusCodes = {
|
||||
# 1xx
|
||||
"Continue" = 100;
|
||||
|
@ -205,7 +224,7 @@ let
|
|||
] ++ [
|
||||
"${bins.nint}"
|
||||
# always pass depot so scripts can use this library
|
||||
"--arg depot '(import ${depot.path} {})'"
|
||||
"--arg depot '(import ${minimalDepot} {})'"
|
||||
]);
|
||||
in runExecline.local drvName {} [
|
||||
"importas" "out" "out"
|
||||
|
|
Loading…
Reference in a new issue