Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 45 lines 1.3 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5}: 6 7buildGoModule rec { 8 pname = "tflint-ruleset-google"; 9 version = "0.34.0"; 10 11 src = fetchFromGitHub { 12 owner = "terraform-linters"; 13 repo = pname; 14 rev = "v${version}"; 15 hash = "sha256-rbV7eNQAN4RjhsIUfxIFCPdcAAehuWv5iGwCxEFKhsU="; 16 }; 17 18 vendorHash = "sha256-cDKcBbyF7iizJ9j5qAMME7WlsP1UJ7Ti9W1hzA3XfV0="; 19 20 # upstream Makefile also does a go test $(go list ./... | grep -v integration) 21 preCheck = '' 22 rm integration/integration_test.go 23 ''; 24 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; { 39 homepage = "https://github.com/terraform-linters/tflint-ruleset-google"; 40 description = "TFLint ruleset plugin for Terraform Google Provider"; 41 platforms = platforms.unix; 42 maintainers = with maintainers; [ john-rodewald ]; 43 license = with licenses; [ mpl20 ]; 44 }; 45}