Skip to content

Commit 3cc9802

Browse files
authored
chore: add a minimal nix flake (#216)
1 parent 6d1b736 commit 3cc9802

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Terraform provider for [Coder](https://github.com/coder/coder).
44

55
### Developing
66

7+
#### Prerequisites
8+
9+
- [Go](https://golang.org/doc/install)
10+
- [Terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli)
11+
12+
We recommend using [`nix`](https://nixos.org/download.html) to manage your development environment. If you have `nix` installed, you can run `nix develop` to enter a shell with all the necessary dependencies.
13+
14+
Alternatively, you can install the dependencies manually.
15+
16+
#### Building
17+
718
Follow the instructions outlined in the [Terraform documentation](https://developer.hashicorp.com/terraform/cli/config/config-file#development-overrides-for-provider-developers)
819
to setup your local Terraform to use your local version rather than the registry version.
920

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
description = "Terraform provider for Coder";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = { self, nixpkgs, flake-utils, ... }:
10+
flake-utils.lib.eachDefaultSystem (system:
11+
let
12+
pkgs = import nixpkgs {
13+
inherit system;
14+
config = {
15+
allowUnfree = true;
16+
};
17+
};
18+
in
19+
{
20+
devShell = pkgs.mkShell {
21+
name = "devShell";
22+
buildInputs = with pkgs; [
23+
terraform
24+
go_1_20
25+
];
26+
};
27+
}
28+
);
29+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy