tflint-plugins: allow unversioned references
This commit is contained in:
@@ -23,8 +23,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