tflint-plugins: small compatibility fixes, version update (#411805)

authored by Florian Klink and committed by GitHub 7f25223c 490fa181

+23 -4
+2 -1
pkgs/by-name/tf/tflint/package.nix
··· 43 paths = [ actualPlugins ]; 44 }; 45 in 46 - runCommand "tflint-with-plugins" 47 { 48 nativeBuildInputs = [ makeWrapper ]; 49 } 50 '' 51 makeWrapper ${tflint}/bin/tflint $out/bin/tflint \
··· 43 paths = [ actualPlugins ]; 44 }; 45 in 46 + runCommand "tflint-with-plugins-${version}" 47 { 48 nativeBuildInputs = [ makeWrapper ]; 49 + inherit version; 50 } 51 '' 52 makeWrapper ${tflint}/bin/tflint $out/bin/tflint \
+15 -3
pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-aws.nix
··· 6 7 buildGoModule rec { 8 pname = "tflint-ruleset-aws"; 9 - version = "0.37.0"; 10 11 src = fetchFromGitHub { 12 owner = "terraform-linters"; 13 repo = pname; 14 rev = "v${version}"; 15 - hash = "sha256-7xS1V7Ec3eWiVjMB/4MLeKlGxNKRYeHVFc61dpoBU/8="; 16 }; 17 18 - vendorHash = "sha256-XUGcRky0GMV2RSahUk6k/KWkWvxdCLi/7TpXn2MdNoM="; 19 20 # upstream Makefile also does a go test $(go list ./... | grep -v integration) 21 preCheck = '' ··· 23 ''; 24 25 postInstall = '' 26 mkdir -p $out/github.com/terraform-linters/${pname}/${version} 27 mv $out/bin/${pname} $out/github.com/terraform-linters/${pname}/${version}/ 28 # remove other binaries from bin 29 rm -R $out/bin 30 '';
··· 6 7 buildGoModule rec { 8 pname = "tflint-ruleset-aws"; 9 + version = "0.40.0"; 10 11 src = fetchFromGitHub { 12 owner = "terraform-linters"; 13 repo = pname; 14 rev = "v${version}"; 15 + hash = "sha256-n8o43zCZWrTmLdEuCPe9B1lqxnCbytwRUXSof2sI1Zw="; 16 }; 17 18 + vendorHash = "sha256-PBXObv/9QwWPmLnTReV7iuFyas1RFtvlboEjPfyIi7w="; 19 + 20 + postPatch = '' 21 + # some automation for creating new releases on GitHub, which we don't need 22 + rm -rf tools/release 23 + ''; 24 25 # upstream Makefile also does a go test $(go list ./... | grep -v integration) 26 preCheck = '' ··· 28 ''; 29 30 postInstall = '' 31 + # allow use as a versioned dependency, i.e., with `source = ...` and 32 + # `version = ...` in `.tflintrc`: 33 mkdir -p $out/github.com/terraform-linters/${pname}/${version} 34 mv $out/bin/${pname} $out/github.com/terraform-linters/${pname}/${version}/ 35 + 36 + # allow use as an unversioned dependency, e.g., if one wants `.tflintrc` to 37 + # solely rely on Nix to pin versions: 38 + ln -s $out/github.com/terraform-linters/${pname}/${version}/${pname} $out/ 39 + 40 # remove other binaries from bin 41 rm -R $out/bin 42 '';
+6
pkgs/development/tools/analysis/tflint-plugins/tflint-ruleset-google.nix
··· 25 subPackages = [ "." ]; 26 27 postInstall = '' 28 mkdir -p $out/github.com/terraform-linters/${pname}/${version} 29 mv $out/bin/${pname} $out/github.com/terraform-linters/${pname}/${version}/ 30 ''; 31 32 meta = with lib; {
··· 25 subPackages = [ "." ]; 26 27 postInstall = '' 28 + # allow use as a versioned dependency, i.e., with `source = ...` and 29 + # `version = ...` in `.tflintrc`: 30 mkdir -p $out/github.com/terraform-linters/${pname}/${version} 31 mv $out/bin/${pname} $out/github.com/terraform-linters/${pname}/${version}/ 32 + 33 + # allow use as an unversioned dependency, e.g., if one wants `.tflintrc` to 34 + # solely rely on Nix to pin versions: 35 + ln -s $out/github.com/terraform-linters/${pname}/${version}/${pname} $out/ 36 ''; 37 38 meta = with lib; {