1
0
Fork 0

Add agilebits-op

This commit is contained in:
Daniel Kempkens 2022-03-19 22:12:18 +01:00
parent ff8fd2dcfd
commit 624204dac9
6 changed files with 51 additions and 4 deletions

View file

@ -2,5 +2,6 @@
## Software ## Software
* [agilebits-op](https://app-updates.agilebits.com/product_history/CLI2)
* [cliclick](https://github.com/BlueM/cliclick) * [cliclick](https://github.com/BlueM/cliclick)
* [proximity-sort](https://github.com/jonhoo/proximity-sort) * [proximity-sort](https://github.com/jonhoo/proximity-sort)

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1639807448, "lastModified": 1647350163,
"narHash": "sha256-VA9twSpyM0e5Y5XAm20y5Vg6avky+imzfr65FoFq0G0=", "narHash": "sha256-OcMI+PFEHTONthXuEQNddt16Ml7qGvanL3x8QOl2Aao=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2d555e5f6529d8485ea7ccdbd3633cf1681eaa2e", "rev": "3eb07eeafb52bcbf02ce800f032f18d666a9498d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,7 +3,7 @@ _: super:
let custom = super.callPackage ./packages.nix { }; in let custom = super.callPackage ./packages.nix { }; in
{ {
inherit custom; inherit (custom) agilebits-op;
inherit (custom) cliclick; inherit (custom) cliclick;
inherit (custom) proximity-sort; inherit (custom) proximity-sort;
} }

View file

@ -1,6 +1,7 @@
{ system, lib, pkgs }: { system, lib, pkgs }:
{ {
agilebits-op = import ./packages/agilebits-op.nix { inherit system lib pkgs; };
cliclick = import ./packages/cliclick.nix { inherit system lib pkgs; }; cliclick = import ./packages/cliclick.nix { inherit system lib pkgs; };
proximity-sort = import ./packages/proximity-sort.nix { inherit system lib pkgs; }; proximity-sort = import ./packages/proximity-sort.nix { inherit system lib pkgs; };
} }

37
packages/agilebits-op.nix Normal file
View file

@ -0,0 +1,37 @@
{ system, lib, pkgs }:
pkgs.stdenv.mkDerivation rec {
pname = "agilebits-op";
version = "2.0.0";
src = pkgs.fetchurl {
url = "https://cache.agilebits.com/dist/1P/op2/pkg/v${version}/op_apple_universal_v${version}.pkg";
sha256 = "DC9hdzRjQ9iNjbe6PfRpMXzDeInq4rYSAa2nDHQMTRo=";
};
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" ];
};
}

View file

@ -23,11 +23,19 @@ pkgs.stdenv.mkDerivation {
IOKit IOKit
]); ]);
dontStrip = true;
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp cliclick $out/bin cp cliclick $out/bin
''; '';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/cliclick -V
'';
meta = with lib; { meta = with lib; {
description = "macOS CLI tool for emulating mouse and keyboard events"; description = "macOS CLI tool for emulating mouse and keyboard events";
homepage = "https://github.com/BlueM/cliclick"; homepage = "https://github.com/BlueM/cliclick";