Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform_0_14: init at 0.14.0 #105746

Merged
merged 1 commit into from Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 18 additions & 9 deletions pkgs/applications/networking/cluster/terraform/default.nix
@@ -1,15 +1,13 @@
{ stdenv, lib, buildEnv, buildGoPackage, fetchFromGitHub, makeWrapper, coreutils
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, coreutils
, runCommand, runtimeShell, writeText, terraform-providers, fetchpatch }:

let
goPackagePath = "github.com/hashicorp/terraform";

generic = { version, sha256, ... }@attrs:
let attrs' = builtins.removeAttrs attrs [ "version" "sha256" ];
in buildGoPackage ({
generic = { version, sha256, vendorSha256 ? null, ... }@attrs:
let attrs' = builtins.removeAttrs attrs [ "version" "sha256" "vendorSha256" ];
in buildGoModule ({
name = "terraform-${version}";

inherit goPackagePath;
inherit vendorSha256;

src = fetchFromGitHub {
owner = "hashicorp";
Expand All @@ -18,7 +16,7 @@ let
inherit sha256;
};

postPatch = ''
postConfigure = ''
# speakeasy hardcodes /bin/stty https://github.com/bgentry/speakeasy/issues/22
substituteInPlace vendor/github.com/bgentry/speakeasy/speakeasy_unix.go \
--replace "/bin/stty" "${coreutils}/bin/stty"
Expand All @@ -34,9 +32,12 @@ let
'';

preCheck = ''
export HOME=$TMP
export HOME=$TMPDIR
export TF_SKIP_REMOTE_TESTS=1
'';

subPackages = [ "." ];

meta = with stdenv.lib; {
description =
"Tool for building, changing, and versioning infrastructure";
Expand Down Expand Up @@ -163,6 +164,14 @@ in rec {
passthru = { inherit plugins; };
});

terraform_0_14 = pluggable (generic {
version = "0.14.0";
sha256 = "0pbglnvb6cx8zrz791lfa67dmjqfsyysbxm2083b1lhlmbybi9ax";
vendorSha256 = "1gxhdj98np482jm76aj6zbbmkn7vfk8b878hzz59iywgbdr1r4m1";
patches = [ ./provider-path.patch ];
passthru = { inherit plugins; };
});

# Tests that the plugins are being used. Terraform looks at the specific
# file pattern and if the plugin is not found it will try to download it
# from the Internet. With sandboxing enable this test will fail if that is
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -28135,6 +28135,7 @@ in
terraform_0_11-full
terraform_0_12
terraform_0_13
terraform_0_14
terraform_plugins_test
;

Expand Down