tflint-plugins: small compatibility fixes, version update (#411805)
This commit is contained in:
@@ -43,9 +43,10 @@ buildGoModule {
|
||||
paths = [ actualPlugins ];
|
||||
};
|
||||
in
|
||||
runCommand "tflint-with-plugins"
|
||||
runCommand "tflint-with-plugins-${version}"
|
||||
{
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
inherit version;
|
||||
}
|
||||
''
|
||||
makeWrapper ${tflint}/bin/tflint $out/bin/tflint \
|
||||
|
||||
@@ -6,16 +6,21 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "tflint-ruleset-aws";
|
||||
version = "0.37.0";
|
||||
version = "0.40.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "terraform-linters";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-7xS1V7Ec3eWiVjMB/4MLeKlGxNKRYeHVFc61dpoBU/8=";
|
||||
hash = "sha256-n8o43zCZWrTmLdEuCPe9B1lqxnCbytwRUXSof2sI1Zw=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-XUGcRky0GMV2RSahUk6k/KWkWvxdCLi/7TpXn2MdNoM=";
|
||||
vendorHash = "sha256-PBXObv/9QwWPmLnTReV7iuFyas1RFtvlboEjPfyIi7w=";
|
||||
|
||||
postPatch = ''
|
||||
# some automation for creating new releases on GitHub, which we don't need
|
||||
rm -rf tools/release
|
||||
'';
|
||||
|
||||
# upstream Makefile also does a go test $(go list ./... | grep -v integration)
|
||||
preCheck = ''
|
||||
@@ -23,8 +28,15 @@ buildGoModule rec {
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# allow use as a versioned dependency, i.e., with `source = ...` and
|
||||
# `version = ...` in `.tflintrc`:
|
||||
mkdir -p $out/github.com/terraform-linters/${pname}/${version}
|
||||
mv $out/bin/${pname} $out/github.com/terraform-linters/${pname}/${version}/
|
||||
|
||||
# allow use as an unversioned dependency, e.g., if one wants `.tflintrc` to
|
||||
# solely rely on Nix to pin versions:
|
||||
ln -s $out/github.com/terraform-linters/${pname}/${version}/${pname} $out/
|
||||
|
||||
# remove other binaries from bin
|
||||
rm -R $out/bin
|
||||
'';
|
||||
|
||||
@@ -25,8 +25,14 @@ buildGoModule rec {
|
||||
subPackages = [ "." ];
|
||||
|
||||
postInstall = ''
|
||||
# allow use as a versioned dependency, i.e., with `source = ...` and
|
||||
# `version = ...` in `.tflintrc`:
|
||||
mkdir -p $out/github.com/terraform-linters/${pname}/${version}
|
||||
mv $out/bin/${pname} $out/github.com/terraform-linters/${pname}/${version}/
|
||||
|
||||
# allow use as an unversioned dependency, e.g., if one wants `.tflintrc` to
|
||||
# solely rely on Nix to pin versions:
|
||||
ln -s $out/github.com/terraform-linters/${pname}/${version}/${pname} $out/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user