_1password-cli: inline mainProgram in install and checks

- Replace `${pname}` reference in error message with explicit
`"1password-cli"` for clarity.
- Inline `op` instead of `${mainProgram}` in:
- `installPhase` binary installation
- shell completion installation
- `versionCheckProgram`
- Ensures consistency, avoids unnecessary indirection, and
makes the derivation easier to read and maintain.

+7 -7
+7 -7
pkgs/by-name/_1/_1password-cli/package.nix
··· 44 if (builtins.elem system platforms) then 45 sources.${system} 46 else 47 - throw "Source for ${pname} is not available for ${system}"; 48 49 nativeBuildInputs = [ 50 installShellFiles ··· 63 64 installPhase = '' 65 runHook preInstall 66 - install -D ${mainProgram} $out/bin/${mainProgram} 67 runHook postInstall 68 ''; 69 70 postInstall = '' 71 HOME=$TMPDIR 72 - installShellCompletion --cmd ${mainProgram} \ 73 - --bash <($out/bin/${mainProgram} completion bash) \ 74 - --fish <($out/bin/${mainProgram} completion fish) \ 75 - --zsh <($out/bin/${mainProgram} completion zsh) 76 ''; 77 78 dontStrip = stdenv.hostPlatform.isDarwin; 79 80 doInstallCheck = true; 81 82 - versionCheckProgram = "${builtins.placeholder "out"}/bin/${mainProgram}"; 83 versionCheckProgramArg = "--version"; 84 85 passthru = {
··· 44 if (builtins.elem system platforms) then 45 sources.${system} 46 else 47 + throw "Source for 1password-cli is not available for ${system}"; 48 49 nativeBuildInputs = [ 50 installShellFiles ··· 63 64 installPhase = '' 65 runHook preInstall 66 + install -D op $out/bin/op 67 runHook postInstall 68 ''; 69 70 postInstall = '' 71 HOME=$TMPDIR 72 + installShellCompletion --cmd op \ 73 + --bash <($out/bin/op completion bash) \ 74 + --fish <($out/bin/op completion fish) \ 75 + --zsh <($out/bin/op completion zsh) 76 ''; 77 78 dontStrip = stdenv.hostPlatform.isDarwin; 79 80 doInstallCheck = true; 81 82 + versionCheckProgram = "${builtins.placeholder "out"}/bin/op"; 83 versionCheckProgramArg = "--version"; 84 85 passthru = {