Skip to content

Commit dea82ee

Browse files
committed
chore: copy nixfile instead of git submodules
1 parent 8bd4ab5 commit dea82ee

File tree

4 files changed

+39
-7
lines changed

4 files changed

+39
-7
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ Before opening a Pull Request, please do the following:
135135
136136
2. Execute `pre-commit install`: Hooks configured in `.pre-commit-config.yaml` will be executed automatically on commit. For manual execution, you can use `pre-commit run -a`.
137137
138-
To update git submodules, execute `git submodule foreach git pull`.
139-
140138
<!-- BEGIN_TF_DOCS -->
141139
## Requirements
142140

default.nix

Lines changed: 0 additions & 1 deletion
This file was deleted.

default.nix

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{ pkgs ? import <nixpkgs> { }, system ? builtins.currentSystem }:
2+
3+
let
4+
# fake opentofu as terraform so that tools like terraform-docs pre-commit hook (which doesn't have tofu support)
5+
# fall back to tofu
6+
tofu_terraform =
7+
pkgs.stdenv.mkDerivation {
8+
name = "tofu-terraform";
9+
phases = [ "installPhase" ];
10+
installPhase = ''
11+
mkdir -p $out/bin
12+
echo '#!/usr/bin/env sh' > $out/bin/terraform
13+
echo 'tofu $@' > $out/bin/terraform
14+
chmod +x $out/bin/terraform
15+
'';
16+
};
17+
18+
in
19+
20+
pkgs.mkShell {
21+
NIX_SHELL = "terraform-meshplatform-modules";
22+
shellHook = ''
23+
echo starting terraform-meshplatform-modules shell
24+
terraform -v
25+
tofu -v
26+
terraform-docs -v
27+
pre-commit --version
28+
'';
29+
30+
buildInputs = [
31+
pkgs.pre-commit
32+
pkgs.opentofu
33+
pkgs.tflint
34+
pkgs.terraform-docs
35+
36+
# fake tofu as terraform
37+
tofu_terraform
38+
];
39+
}

shared-workflows

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)