2022-10-21 18:38:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, callPackage
|
|
|
|
, channel ? "stable"
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchurl
|
2022-10-21 18:38:19 +00:00
|
|
|
, lib
|
|
|
|
# This is only relevant for Linux, so we need to pass it through
|
|
|
|
, polkitPolicyOwners ? [ ] }:
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "1password";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = if channel == "stable" then "8.10.24" else "8.10.26-1.BETA";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
sources = {
|
|
|
|
stable = {
|
|
|
|
x86_64-linux = {
|
2022-08-21 13:32:41 +00:00
|
|
|
url = "https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-vYk7WHGVOzrrep6vmA58ELa6aDsZFUw5D2StCYP0Ioc=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
aarch64-linux = {
|
|
|
|
url = "https://downloads.1password.com/linux/tar/stable/aarch64/1password-${version}.arm64.tar.gz";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-HuhoGG2aQ2NcbZlQfUmGUl0IvhXPO5uV7x4WKJRR7Ew=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-RHn1JJoRLWfqOTx0Di0nfHM7fbLs54DdWlI+PTQs1sQ=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-ZjmgkGTY6KQ0vv7ILMMLYsK7N2YLmJGCBS6954v0JX8=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
beta = {
|
|
|
|
x86_64-linux = {
|
|
|
|
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-dAasy1D5HXQ8Eu5cx0u9exobNMf2TIV4iCTcys/uCtQ=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
aarch64-linux = {
|
|
|
|
url = "https://downloads.1password.com/linux/tar/beta/aarch64/1password-${version}.arm64.tar.gz";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-sIPNv4HiU/6CLaER6deMG88zOOFwu6cm5XoB2Cr4qLQ=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-Va4WgbPKrI7u+GYzVmA8Gp6NRY4EdJuoz00Pc5HsMIg=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-Dj96QoEcmJxV7qBkb68ovonr+XYqQdScb9GMeL8OCJo=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
src = fetchurl {
|
2023-07-15 17:15:38 +00:00
|
|
|
inherit (sources.${channel}.${stdenv.system}) url hash;
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Multi-platform password manager";
|
|
|
|
homepage = "https://1password.com/";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-08-20 17:08:02 +00:00
|
|
|
license = licenses.unfree;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ timstott savannidgerinel amaxine sebtm ];
|
2022-10-21 18:38:19 +00:00
|
|
|
platforms = builtins.attrNames sources.${channel};
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "1password";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
in if stdenv.isDarwin
|
|
|
|
then callPackage ./darwin.nix { inherit pname version src meta; }
|
|
|
|
else callPackage ./linux.nix { inherit pname version src meta polkitPolicyOwners; }
|