···25 subPackages = [ "." ];
2627 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 '';
3738 meta = with lib; {