Skip to content

Commit

Permalink
terraform-provider-nixos: move the provider to the inside of terrafor…
Browse files Browse the repository at this point in the history
…m.withPlugins
  • Loading branch information
kalbasit committed Sep 19, 2018
1 parent 1213d8b commit ac1c278
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 40 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -595,4 +595,11 @@
version = "1.8.1";
sha256 = "0y6n7mvv1f3jqsxlvf68iq85k69fj7a333203vkvc83dba84aqki";
};
nixos =
{
owner = "tweag";
repo = "terraform-provider-nixos";
version = "0.0.1";
sha256 = "00vz6qjq1pk39iqg4356b8g3c6slla9jifkv2knk46gc9q93q0lf";
};
}
37 changes: 22 additions & 15 deletions pkgs/applications/networking/cluster/terraform/providers/update-all
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ EOF

indent() { sed 's/^/ /'; }

add_repo() {
org="${1}"
repo="${2}"

echo "*** $repo ***"
name=$(echo "$repo" | cut -d - -f 3-)
last_tag=$(get_repo_tags "$org" "$repo" | tail -1)
last_tag_sha256=$(prefetch_github "$org" "$repo" "$last_tag")

{
echo " $name ="
echo_entry "$org" "$repo" "$last_tag" "$last_tag_sha256" | indent
} >> data.nix
}

## Main ##

cd "$(dirname "$0")"
Expand All @@ -89,29 +104,21 @@ HELP
exit 1
fi

org=terraform-providers

repos=$(get_org_repos "$org" | grep terraform-provider- | grep -v terraform-provider-scaffolding | grep -v terraform-provider-azure-classic | sort)

# Get all the providers with index

cat <<HEADER > data.nix
# Generated with ./update-all
{
HEADER

# add all the repos under the terraform-providers organisation
org=terraform-providers
repos=$(get_org_repos "$org" | grep terraform-provider- | grep -v terraform-provider-scaffolding | grep -v terraform-provider-azure-classic | sort)
for repo in $repos; do
echo "*** $repo ***"
name=$(echo "$repo" | cut -d - -f 3-)
last_tag=$(get_repo_tags "$org" "$repo" | tail -1)
last_tag_sha256=$(prefetch_github "$org" "$repo" "$last_tag")

{
echo " $name ="
echo_entry "$org" "$repo" "$last_tag" "$last_tag_sha256" | indent
} >> data.nix
add_repo "$org" "$repo"
done

# add the repos that live outside of terraform-providers
add_repo tweag terraform-provider-nixos

cat <<FOOTER >> data.nix
}
FOOTER
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22064,8 +22064,6 @@ with pkgs;

terraform-inventory = callPackage ../applications/networking/cluster/terraform-inventory {};

terraform-provider-nixos = callPackage ../applications/networking/cluster/terraform-provider-nixos {};

terraform-landscape = callPackage ../applications/networking/cluster/terraform-landscape {};

terraform-provider-libvirt = callPackage ../applications/networking/cluster/terraform-provider-libvirt {};
Expand Down

0 comments on commit ac1c278

Please sign in to comment.