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.8.0 -> 1.9.1 #121828

Merged
merged 1 commit into from May 5, 2021
Merged

_1password: 1.8.0 -> 1.9.1 #121828

merged 1 commit into from May 5, 2021

Conversation

wlib
Copy link
Contributor

@wlib wlib commented May 5, 2021

Motivation for this change

Just to update the 1password cli. They added secrets automation to the 1.9.0 release and this is just the latest release anyways.

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.

cc @joelburget @marsam

I just want to also include that we can probably use passthru.updateScript, but I'm not sure how to do so correctly. The 1password docs also mentions verifying the binaries with their provided signature https://support.1password.com/command-line-getting-started/#set-up-the-command-line-tool - but I had errors with gpg receiving keys (I manually verified instead). How can we automate this for the update script? I drafted this so far, but it errors:

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pup gnused common-updater-scripts

set -eu -o pipefail

version="$(curl -Ls https://app-updates.agilebits.com/product_history/CLI | \
  pup '.cli-archs .linux a attr{href}' | head -n 1 | \
  sed -E 's/.+_v(.+)\.zip$/\1/')"
update-source-version _1password "$version"

@r-rmcgibbo
Copy link

r-rmcgibbo commented May 5, 2021

Result of nixpkgs-review pr 121828 at dc34664 run on x86_64-linux 1

1 package built successfully:
  • _1password
1 suggestion:
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/applications/misc/1password/default.nix:31:3:

       |
    31 |   installPhase = ''
       |   ^
    

Result of nixpkgs-review pr 121828 at dc34664 run on aarch64-linux 1

1 package built successfully:
  • _1password
1 suggestion:
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/applications/misc/1password/default.nix:31:3:

       |
    31 |   installPhase = ''
       |   ^
    

@globin globin merged commit 361bea3 into NixOS:master May 5, 2021
@tapayne88
Copy link
Contributor

Hi, I'm unable to install 1password since this update. I get the following

building '/nix/store/j3aawc5w56vlvy1g1lh8a144gb54jpnw-1password-1.9.1.drv'...
unpacking sources
gzip: Payload.gz: No such file or directory
cpio: premature end of archive
builder for '/nix/store/j3aawc5w56vlvy1g1lh8a144gb54jpnw-1password-1.9.1.drv' failed with exit code 2
nix-shell -p nix-info --run "nix-info -m"
  /nix/store/409niiibklx2x14b1jaklc81p4k4z46l-readline-7.0p5
  /nix/store/ax66zc5bysak154321icmrslgh45xi4k-nix-info
  /nix/store/cqriycvp0h2cpkd2wjhyws2002v3gxw4-bash-interactive-4.4-p23-dev
  /nix/store/kd7azfw8riv2rbamjplpq7cbv98g2339-bash-interactive-4.4-p23-doc
  /nix/store/l21b7fhynsfnkv92gd3g7wb5prn0vys5-bash-interactive-4.4-p23-info
  /nix/store/lmkym1rhddadra9rszbd5s9zvimw60ca-bash-interactive-4.4-p23-man
  /nix/store/xrcd79823r40r6633pral3n3wcnrkdwd-bash-interactive-4.4-p23
copying path '/nix/store/kd7azfw8riv2rbamjplpq7cbv98g2339-bash-interactive-4.4-p23-doc' from 'https://cache.nixos.org'...
copying path '/nix/store/l21b7fhynsfnkv92gd3g7wb5prn0vys5-bash-interactive-4.4-p23-info' from 'https://cache.nixos.org'...
copying path '/nix/store/lmkym1rhddadra9rszbd5s9zvimw60ca-bash-interactive-4.4-p23-man' from 'https://cache.nixos.org'...
copying path '/nix/store/ax66zc5bysak154321icmrslgh45xi4k-nix-info' from 'https://cache.nixos.org'...
copying path '/nix/store/409niiibklx2x14b1jaklc81p4k4z46l-readline-7.0p5' from 'https://cache.nixos.org'...
copying path '/nix/store/xrcd79823r40r6633pral3n3wcnrkdwd-bash-interactive-4.4-p23' from 'https://cache.nixos.org'...
copying path '/nix/store/cqriycvp0h2cpkd2wjhyws2002v3gxw4-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 18.7.0, macOS 10.14.6`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.10`
 - channels(thomas.payne): `"home-manager-20.09, nixpkgs-20.09pre246824.1b688ca59ba, nixpkgs-unstable-21.05pre287374.1c16013bd6e"`
 - nixpkgs: `/Users/thomas.payne/.nix-defexpr/channels/nixpkgs`

I've done a bit of digging and running this line produces a different folder structure in 1.9.1 to 1.8.0

  • 1.8.0
op_1.8.0 xar -xf ~/Downloads/op_darwin_amd64_v1.8.0.pkg                                                                                                                                                                                  op_1.8.0 tree                                                                                                                                                                                                                            
.
├── Bom
├── PackageInfo
├── Payload
└── Scripts

0 directories, 4 files
  • 1.9.1
op_1.9.1 xar -xf ~/Downloads/op_darwin_amd64_v1.9.1.pkg                                                                                                                                                                                   op_1.9.1 tree                                                                                                                                                                                                                            
.
├── Distribution
└── op.pkg
    ├── Bom
    ├── PackageInfo
    ├── Payload
    └── Scripts

1 directory, 5 files

@eraserhd
Copy link
Contributor

eraserhd commented May 10, 2021

I also have this issue.

EDIT: On Darwin.

@jeffutter
Copy link
Contributor

jeffutter commented May 12, 2021

Can confirm that:

  my_1password = pkgs._1password.overrideAttrs (oldAttrs: rec {
    unpackPhase = ''
      xar -xf $src
      zcat op.pkg/Payload | cpio -i
    '';
  });

fixes things for me. I'll maybe see if I can open a PR for this.

Edit: #122662

@jeffutter jeffutter mentioned this pull request May 12, 2021
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants