Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_1password: 1.1.1 -> 1.2.0 #92375

Closed

Conversation

@IvarWithoutBones
Copy link
Contributor

@IvarWithoutBones IvarWithoutBones commented Jul 5, 2020

Motivation for this change

Another new 1password release. Release notes state that bash and zsh completion is added, though you have to manually enable it as per their help section. (source <(op completion bash) for bash, eval "$(op _completion zsh)"; compdef _op op for zsh). Not sure if we can automate this.

Added myself as a maintainer as well, as i actively use this application a lot.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@danieldk
Copy link
Member

@danieldk danieldk commented Jul 6, 2020

Another new 1password release. Release notes state that bash and zsh completion is added, though you have to manually enable it as per their help section. (source <(op completion bash) for bash, eval "$(op _completion zsh)"; compdef _op op for zsh). Not sure if we can automate this.

In postInstall do (untested):

$out/bin/op completion bash > op.bash
$out/bin/op completion zsh > op.zsh
installShellCompletion op.{bash,zsh}

To get installShellCompletion, put installShellFiles in nativeBuildInputs.

@IvarWithoutBones IvarWithoutBones force-pushed the IvarWithoutBones:1password-1.2.0 branch from ebb7746 to ddfa01b Jul 6, 2020
@IvarWithoutBones
Copy link
Contributor Author

@IvarWithoutBones IvarWithoutBones commented Jul 6, 2020

Another new 1password release. Release notes state that bash and zsh completion is added, though you have to manually enable it as per their help section. (source <(op completion bash) for bash, eval "$(op _completion zsh)"; compdef _op op for zsh). Not sure if we can automate this.

In postInstall do (untested):

$out/bin/op completion bash > op.bash
$out/bin/op completion zsh > op.zsh
installShellCompletion op.{bash,zsh}

To get installShellCompletion, put installShellFiles in nativeBuildInputs.

Thank you, was not aware this was a thing. Not sure how i can test this though, usually i just build my changes with nix-build, however this doesn't seem to enable the completion.

@IvarWithoutBones IvarWithoutBones force-pushed the IvarWithoutBones:1password-1.2.0 branch 2 times, most recently from 8050499 to 6ff211c Jul 6, 2020
postInstall = ''
$out/bin/op completion bash > op.bash
$out/bin/op completion zsh > op.zsh
installShellCompletion op.{bash,zsh}
'';
Comment on lines 44 to 48

This comment has been minimized.

@danieldk

danieldk Jul 6, 2020
Member

I didn't look at the rest of the derivation yet and it seems that it already has an installPhase, so these can just go there.

This comment has been minimized.

@danieldk

danieldk Jul 6, 2020
Member

Hmpf, that's annoying, this is a precompiled binary, so it's not actually runnable yet. Moreover, moving this to postFixup doesn't work either, because auto-patchelf also runs during postFixup.

There are three obvious options, but I don't have any strong preferences:

  1. Do not ship the shell completions.
  2. Run autoPatchelf in another phase.
  3. Use a patchPhase that does everything in the correct order.

Anyone?

pkgs/applications/misc/1password/default.nix Outdated Show resolved Hide resolved
@IvarWithoutBones IvarWithoutBones force-pushed the IvarWithoutBones:1password-1.2.0 branch from 6ff211c to fb391e5 Jul 6, 2020
@marsam
Copy link
Contributor

@marsam marsam commented Oct 4, 2020

superseded by 020ff69

@marsam marsam closed this Oct 4, 2020
@IvarWithoutBones IvarWithoutBones deleted the IvarWithoutBones:1password-1.2.0 branch Oct 5, 2020
@IvarWithoutBones IvarWithoutBones restored the IvarWithoutBones:1password-1.2.0 branch Oct 5, 2020
@IvarWithoutBones IvarWithoutBones deleted the IvarWithoutBones:1password-1.2.0 branch Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.