2024-07-14 19:21:38 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
callPackage,
|
|
|
|
channel ? "stable",
|
|
|
|
fetchurl,
|
|
|
|
lib,
|
|
|
|
# This is only relevant for Linux, so we need to pass it through
|
|
|
|
polkitPolicyOwners ? [ ],
|
|
|
|
}:
|
2022-03-16 18:09:37 +00:00
|
|
|
|
|
|
|
let
|
2020-08-08 07:06:45 +00:00
|
|
|
pname = "1password";
|
2024-12-03 18:46:12 +00:00
|
|
|
version = if channel == "stable" then "8.10.54" else "8.10.56-1.BETA";
|
2020-08-08 07:06:45 +00:00
|
|
|
|
2022-10-08 05:39:06 +00:00
|
|
|
sources = {
|
|
|
|
stable = {
|
|
|
|
x86_64-linux = {
|
2022-08-12 21:46:13 +00:00
|
|
|
url = "https://downloads.1password.com/linux/tar/stable/x86_64/1password-${version}.x64.tar.gz";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-kpFO59DPBCgD3EdYxq1tom/5/misBsafbsJS+Wj2l3I=";
|
2022-08-12 21:46:13 +00:00
|
|
|
};
|
2022-10-08 05:39:06 +00:00
|
|
|
aarch64-linux = {
|
|
|
|
url = "https://downloads.1password.com/linux/tar/stable/aarch64/1password-${version}.arm64.tar.gz";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-ZZKuPxshI9yLSUMccpXaQDbu8gTvFCaS68tqMstZHJE=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-Xha7aOuBvG+R1K48gdPj/v4URuIEYv2le+TCxwDnCwk=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-ukfx7V8totRIyHpmjWDR2O9IDkAY3uq/0jtGPXiZ5Bw=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
beta = {
|
|
|
|
x86_64-linux = {
|
|
|
|
url = "https://downloads.1password.com/linux/tar/beta/x86_64/1password-${version}.x64.tar.gz";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-25vBmc3AJv4NTI2oOrnTR5pMBMK+wx1s/eg5g8jjtb8=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
aarch64-linux = {
|
|
|
|
url = "https://downloads.1password.com/linux/tar/beta/aarch64/1password-${version}.arm64.tar.gz";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-MLnXEqJM9E+2GAXlqX2dGUzFVk0xv5pmUzLdncakWf8=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
x86_64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-x86_64.zip";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-W7VA7DFpIY2D+0ZqNaLfOzTTqryqpA1iy0+yACNrPlg=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
aarch64-darwin = {
|
|
|
|
url = "https://downloads.1password.com/mac/1Password-${version}-aarch64.zip";
|
2024-12-03 18:46:12 +00:00
|
|
|
hash = "sha256-ZH7xuL0SrkncxI/ngDIYHf4bLwUyTQC4Ki3HgUVza+I=";
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2020-08-08 07:06:45 +00:00
|
|
|
|
2022-10-08 05:39:06 +00:00
|
|
|
src = fetchurl {
|
2024-07-14 19:21:38 +00:00
|
|
|
inherit
|
|
|
|
(sources.${channel}.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"))
|
|
|
|
url
|
|
|
|
hash
|
|
|
|
;
|
2022-10-08 05:39:06 +00:00
|
|
|
};
|
2022-09-22 03:45:36 +00:00
|
|
|
|
2024-07-14 19:20:40 +00:00
|
|
|
meta = {
|
|
|
|
# Requires to be installed in "/Application" which is not possible for now (https://github.com/NixOS/nixpkgs/issues/254944)
|
|
|
|
broken = stdenv.hostPlatform.isDarwin;
|
2020-08-08 07:06:45 +00:00
|
|
|
description = "Multi-platform password manager";
|
|
|
|
homepage = "https://1password.com/";
|
2024-07-14 19:20:40 +00:00
|
|
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
|
|
license = lib.licenses.unfree;
|
2024-07-14 19:21:38 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
2024-10-24 04:57:36 +00:00
|
|
|
khaneliman
|
2024-07-14 19:21:38 +00:00
|
|
|
timstott
|
|
|
|
savannidgerinel
|
|
|
|
sebtm
|
|
|
|
];
|
2022-10-08 05:39:06 +00:00
|
|
|
platforms = builtins.attrNames sources.${channel};
|
2023-08-04 19:10:05 +00:00
|
|
|
mainProgram = "1password";
|
2020-08-08 07:06:45 +00:00
|
|
|
};
|
2022-10-08 05:39:06 +00:00
|
|
|
|
2024-07-14 19:21:38 +00:00
|
|
|
in
|
|
|
|
if stdenv.hostPlatform.isDarwin then
|
|
|
|
callPackage ./darwin.nix {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
callPackage ./linux.nix {
|
|
|
|
inherit
|
|
|
|
pname
|
|
|
|
version
|
|
|
|
src
|
|
|
|
meta
|
|
|
|
polkitPolicyOwners
|
|
|
|
;
|
|
|
|
}
|