Skip to content

Commit

Permalink
Update README getting started instructions (#60)
Browse files Browse the repository at this point in the history
* Update README getting started instructions

Closes #59

* Add unfreePredicate allowing terraform

* Fix rustfmt complaint
  • Loading branch information
vkleen authored Dec 6, 2023
1 parent f1b6c38 commit 23d0bfb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This will leave you with a `flake.nix` file containing some glue code for
getting a Nickel contract out of `tf-ncl`, evaluating a Nickel configuration
and calling Terraform. It's as easy as
```shell
nix run .#terraform -- hello-tf.ncl init
nix run .#terraform -- hello-tf.ncl apply
nix develop -c run-terraform init
nix develop -c run-terraform apply
```

Without Nix it's a bit more complicated. You will need to obtain the Nickel
Expand Down
13 changes: 7 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
nickel.url = "github:tweag/nickel";
topiary.url = "github:tweag/topiary";
Expand Down Expand Up @@ -34,7 +34,9 @@

pkgs = import inputs.nixpkgs {
localSystem = { inherit system; };
config = { };
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"terraform"
];
overlays = [
(import inputs.rust-overlay)
];
Expand Down
2 changes: 1 addition & 1 deletion tf-ncl/src/intermediate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl FieldDescriptor {
fn push_down(self, schema: &mut HashMap<String, Attribute>) -> Option<Self> {
let (prefix, rest) = self.split_at_first_wildcard();
let Some(attr) = attribute_at_path(schema, prefix) else {
return Some(self)
return Some(self);
};
match &mut attr.type_ {
Type::Dictionary {
Expand Down

0 comments on commit 23d0bfb

Please sign in to comment.