{ pkgs }: let terraform = pkgs.terraform.withPlugins (p: [ p.google p.github ]); in pkgs.stdenv.mkDerivation rec { name = "tf-github"; src = ./.; init = pkgs.writeShellScriptBin "tf-github-init" '' set -ueo pipefail cd $(git rev-parse --show-toplevel)/ops/github ${terraform}/bin/terraform init ''; plan = pkgs.writeShellScriptBin "tf-github-plan" '' set -ueo pipefail cd $(git rev-parse --show-toplevel)/ops/github ${terraform}/bin/terraform plan ''; apply = pkgs.writeShellScriptBin "tf-github-apply" '' set -ueo pipefail cd $(git rev-parse --show-toplevel)/ops/github ${terraform}/bin/terraform apply ''; }