{ lib, pkgs, sources ? import ../npins, ... }: pkgs.stdenv.mkDerivation { name = "tf-repo"; src = with lib.fileset; toSource { root = ../.; fileset = intersection (gitTracked ../.) ../.; }; buildInputs = [ (import ./tf.nix { inherit lib pkgs; }) ]; buildPhase = '' runHook preBuild pushd launch/ echo '${lib.strings.toJSON sources}' > .npins.json rm .terraform.lock.hcl tofu init -input=false popd runHook postBuild ''; installPhase = '' runHook preInstall cp -r . $out runHook postInstall ''; }