Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.5 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5}: 6 7buildGoModule rec { 8 pname = "tflint-ruleset-aws"; 9 version = "0.41.0"; 10 11 src = fetchFromGitHub { 12 owner = "terraform-linters"; 13 repo = pname; 14 rev = "v${version}"; 15 hash = "sha256-Vw/JlpfeCdasReM4hUouTlGiANUJ08PcTcctEbAuQRM="; 16 }; 17 18 vendorHash = "sha256-ghS99xkbEk3erHZgQNvkra9X1bZk6Ujq7j+O3zC2UVI="; 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 = '' 27 rm integration/integration_test.go 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 ''; 43 44 meta = with lib; { 45 homepage = "https://github.com/terraform-linters/tflint-ruleset-aws"; 46 changelog = "https://github.com/terraform-linters/tflint-ruleset-aws/blob/v${version}/CHANGELOG.md"; 47 description = "TFLint ruleset plugin for Terraform AWS Provider"; 48 maintainers = with maintainers; [ flokli ]; 49 license = with licenses; [ mpl20 ]; 50 }; 51}