Open srounce opened 1 year ago
Adding pname to the wrapper in https://github.com/NixOS/nixpkgs/pull/224005.
The best way to fix this is to either
1) move the -with-plugins annotation to the version (eg: terraform-1.2.3+with-plugins
)
2) or set meta.mainProgram = "terraform"
on the terraform package
Or both
Sorry, I don't understand why we would need to do either of those, does setting the wrapper pname to terraform
not work?
Rechecked, I can reproduce the failure from the example and it works once pname
is set.
Describe the bug
When setting
programs.terraform.package
to the result ofterraform-with-plugins
theterraform
binary cannot be found:To Reproduce
Steps to reproduce the behaviour:
Expected behavior
Treefmt should find the Terraform binary.
System information
OS: Nixos unstable (
5efc8ca954272c4376ac929f4c5ffefcc20551d5
)Versions:
5efc8ca954272c4376ac929f4c5ffefcc20551d5
6717065d6a432bc3f5b827007ad959e6032d5856
Additional context
@zimbatm diagnosed this issue as being due to the
pname
of theterraform-with-plugins
result not being "terraform
". Currentlysettings.formatter.terraform.command = lib.mkForce "${tf}/bin/terraform";
is a valid workaround.