Fediversity/deployment/run/tf-single-host/tf-env.nix
Kiara Grouwstra 0f7433abde data model: add TF test (#506)
add a data model deployment test by VM using opentofu.
builds upon #505.

Reviewed-on: Fediversity/Fediversity#506
2025-09-03 15:14:40 +02:00

31 lines
617 B
Nix

{
lib,
pkgs,
sources ? import ../../../npins,
}:
pkgs.stdenv.mkDerivation {
name = "tf-repo";
src =
with lib.fileset;
toSource {
root = ../../../.;
# don't copy ignored files
fileset = intersection (gitTracked ../../../.) ../../../.;
};
buildInputs = [
(pkgs.callPackage ./tf.nix { })
(pkgs.callPackage ./setup.nix { inherit sources; })
];
buildPhase = ''
runHook preBuild
pushd deployment/run/tf-single-host
source setup
popd
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
}