nightly vm test: full single-host swarm setup up to the meta flake
This commit is contained in:
parent
c490c72413
commit
af434e1374
1 changed files with 559 additions and 26 deletions
33
nix/vm-tests/hyperhive-fixture-repo.nix
Normal file
33
nix/vm-tests/hyperhive-fixture-repo.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# The `hyperhive/hyperhive` repo the offline VM tests put on their forge: one
|
||||
# commit holding the source tree of `self`, with a fixed author and date, so its
|
||||
# id depends on the tree alone.
|
||||
{ pkgs, self }:
|
||||
let
|
||||
commitEnv = ''
|
||||
export HOME=$TMPDIR
|
||||
export GIT_AUTHOR_NAME=fixture GIT_AUTHOR_EMAIL=fixture@forge.test
|
||||
export GIT_COMMITTER_NAME=fixture GIT_COMMITTER_EMAIL=fixture@forge.test
|
||||
export GIT_AUTHOR_DATE="946684800 +0000" GIT_COMMITTER_DATE="946684800 +0000"
|
||||
'';
|
||||
in
|
||||
{
|
||||
inherit commitEnv;
|
||||
|
||||
# `repo.git` (bare, branch `main`) and `rev` (the commit id).
|
||||
hyperhiveRepo =
|
||||
pkgs.runCommand "hyperhive-fixture-repo"
|
||||
{
|
||||
nativeBuildInputs = [ pkgs.git ];
|
||||
}
|
||||
''
|
||||
${commitEnv}
|
||||
cp -a ${self} work
|
||||
chmod -R u+w work
|
||||
git -C work init -q -b main
|
||||
git -C work add -f .
|
||||
git -C work commit -q -m "hyperhive source tree"
|
||||
mkdir $out
|
||||
git clone -q --bare work $out/repo.git
|
||||
git -C work rev-parse HEAD > $out/rev
|
||||
'';
|
||||
}
|
||||
Loading…
Reference in a new issue