1
0
Fork 0
nix-overlay/packages/agilebits-op.nix
Daniel Kempkens 2abde0e81b
All checks were successful
Build / build-amd64-linux (push) Successful in 31s
Build / build-arm64-linux (push) Successful in 1m2s
op: update
2024-02-27 11:48:49 +01:00

38 lines
799 B
Nix

{ pkgs, lib }:
pkgs.stdenv.mkDerivation rec {
pname = "agilebits-op";
version = "2.25.0";
src = pkgs.fetchurl {
url = "https://cache.agilebits.com/dist/1P/op2/pkg/v${version}/op_apple_universal_v${version}.pkg";
hash = "sha256-JO7Hh8PUnW5D3GCJFPcVfIYXzHV6HkckqFnGK9vH7Qs=";
};
buildInputs = with pkgs; [ xar cpio ];
unpackPhase = ''
xar -xf $src
zcat op.pkg/Payload | cpio -i
'';
dontStrip = true;
installPhase = ''
install -D op $out/bin/op
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/op --version
'';
meta = with lib; {
description = "1Password command-line tool";
homepage = "https://developer.1password.com/docs/cli";
#license = licenses.unfree;
platforms = [ "x86_64-darwin" "aarch64-darwin" ];
};
}