mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
69 lines
2.5 KiB
Nix
69 lines
2.5 KiB
Nix
{ stdenv
|
|
, callPackage
|
|
, channel ? "stable"
|
|
, fetchurl
|
|
, lib
|
|
# This is only relevant for Linux, so we need to pass it through
|
|
, polkitPolicyOwners ? [ ] }:
|
|
|
|
let
|
|
|
|
pname = "1password";
|
|
version = if channel == "stable" then "8.10.8" else "8.10.9-29.BETA";
|
|
|
|
sources = {
|
|
stable = {
|
|
x86_64-linux = {
|
|
url = "https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz";
|
|
hash = "sha256-E7lXyxoBL2ziMIIisskJJhZ5ymKyuv4zXEqigUtU41I=";
|
|
};
|
|
aarch64-linux = {
|
|
url = "https://downloads.1password.com/linux/tar/stable/aarch64/1password-${version}.arm64.tar.gz";
|
|
hash = "sha256-V/qJHt49pPEm1g92hEQCscmJ3ZkSHTY2oA69d6DxkmU=";
|
|
};
|
|
x86_64-darwin = {
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
|
|
hash = "sha256-H2t4sEbm2Mp89a++r8oFSyvg19zc9dAsq3phX/h1VVg=";
|
|
};
|
|
aarch64-darwin = {
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
|
|
hash = "sha256-8lVc69Ra0wYxnlVcehtAIujrmUQXmsgsK8ATR4vkBe0=";
|
|
};
|
|
};
|
|
beta = {
|
|
x86_64-linux = {
|
|
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
|
|
hash = "sha256-gC+niXGxg37pzMWu/yzD5KcrzbI39u//syVlPne6nBQ=";
|
|
};
|
|
aarch64-linux = {
|
|
url = "https://downloads.1password.com/linux/tar/beta/aarch64/1password-${version}.arm64.tar.gz";
|
|
hash = "sha256-y9P7032GaNKbDzL922HUwiu3DxqKzTiA5g1I3V+852k=";
|
|
};
|
|
x86_64-darwin = {
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
|
|
hash = "sha256-/avHauTuFmKQiHL1WpRI488F8rcwvEOe26kmGF7sv3k=";
|
|
};
|
|
aarch64-darwin = {
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
|
|
hash = "sha256-kMrA8PhAtOjkgbl9m7NtzIJin+a05llQKdEzlkLE0sY=";
|
|
};
|
|
};
|
|
};
|
|
|
|
src = fetchurl {
|
|
inherit (sources.${channel}.${stdenv.system}) url hash;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Multi-platform password manager";
|
|
homepage = "https://1password.com/";
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ timstott savannidgerinel maxeaubrey sebtm ];
|
|
platforms = builtins.attrNames sources.${channel};
|
|
};
|
|
|
|
in if stdenv.isDarwin
|
|
then callPackage ./darwin.nix { inherit pname version src meta; }
|
|
else callPackage ./linux.nix { inherit pname version src meta polkitPolicyOwners; }
|