feat(protonmail): use latest version
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
3657157b03
commit
d854873bec
2 changed files with 2 additions and 96 deletions
|
@ -91,7 +91,7 @@ in {
|
||||||
# Apps
|
# Apps
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
protonmail-desktop
|
protonmail-desktop # run with `XDG_SESSION_TYPE=x11 proton-mail` if it crashes https://github.com/NixOS/nixpkgs/issues/365156
|
||||||
spotifywm
|
spotifywm
|
||||||
swayimg
|
swayimg
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
|
|
|
@ -1,105 +1,11 @@
|
||||||
final: prev: let
|
final: prev: let
|
||||||
pkgs = final;
|
pkgs = final;
|
||||||
|
|
||||||
inherit (pkgs) recurseIntoAttrs callPackages;
|
inherit (pkgs) callPackages recurseIntoAttrs;
|
||||||
in {
|
in {
|
||||||
# FIXME: https://pr-tracker.nelim.org/?pr=373146
|
# FIXME: https://pr-tracker.nelim.org/?pr=373146
|
||||||
bat-extras = recurseIntoAttrs (callPackages ./bat-extras.nix {});
|
bat-extras = recurseIntoAttrs (callPackages ./bat-extras.nix {});
|
||||||
|
|
||||||
# FIXME: https://pr-tracker.nelim.org/?pr=357699
|
# FIXME: https://pr-tracker.nelim.org/?pr=357699
|
||||||
nodejs_latest = prev.nodejs_22;
|
nodejs_latest = prev.nodejs_22;
|
||||||
|
|
||||||
# FIXME: https://github.com/NixOS/nixpkgs/issues/365156
|
|
||||||
protonmail-desktop = final.callPackage ({
|
|
||||||
lib,
|
|
||||||
stdenv,
|
|
||||||
fetchurl,
|
|
||||||
makeWrapper,
|
|
||||||
dpkg,
|
|
||||||
electron,
|
|
||||||
unzip,
|
|
||||||
}: let
|
|
||||||
mainProgram = "proton-mail";
|
|
||||||
srcHashes = {
|
|
||||||
universal-darwin = "sha256-6b+CNCvrkIA1CvSohSJZq/veZZNsA3lyhVv5SsBlJlw=";
|
|
||||||
x86_64-linux = "sha256-v8ufnQQEqTT5cr7fq8Fozje/NDlBzaCeKIzE6yU/biE=";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "protonmail-desktop";
|
|
||||||
version = "1.0.6";
|
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url =
|
|
||||||
if stdenv.hostPlatform.isDarwin
|
|
||||||
then "https://github.com/ProtonMail/inbox-desktop/releases/download/${version}/Proton.Mail-darwin-universal-${version}.zip"
|
|
||||||
else "https://github.com/ProtonMail/inbox-desktop/releases/download/${version}/proton-mail_${version}_amd64.deb";
|
|
||||||
sha256 =
|
|
||||||
{
|
|
||||||
x86_64-linux = srcHashes.x86_64-linux;
|
|
||||||
x86_64-darwin = srcHashes.universal-darwin;
|
|
||||||
aarch64-darwin = srcHashes.universal-darwin;
|
|
||||||
}
|
|
||||||
.${stdenv.hostPlatform.system}
|
|
||||||
or (throw "unsupported system ${stdenv.hostPlatform.system}");
|
|
||||||
};
|
|
||||||
|
|
||||||
sourceRoot = lib.optionalString stdenv.hostPlatform.isDarwin ".";
|
|
||||||
|
|
||||||
dontConfigure = true;
|
|
||||||
dontBuild = true;
|
|
||||||
|
|
||||||
nativeBuildInputs =
|
|
||||||
[
|
|
||||||
makeWrapper
|
|
||||||
]
|
|
||||||
++ lib.optional stdenv.hostPlatform.isLinux dpkg
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin unzip;
|
|
||||||
|
|
||||||
installPhase = let
|
|
||||||
darwin = ''
|
|
||||||
mkdir -p $out/{Applications,bin}
|
|
||||||
cp -r "Proton Mail.app" $out/Applications/
|
|
||||||
makeWrapper $out/Applications/"Proton Mail.app"/Contents/MacOS/Proton\ Mail $out/bin/protonmail-desktop
|
|
||||||
'';
|
|
||||||
linux = ''
|
|
||||||
runHook preInstall
|
|
||||||
mkdir -p $out
|
|
||||||
cp -r usr/share/ $out/
|
|
||||||
cp -r usr/lib/proton-mail/resources/app.asar $out/share/
|
|
||||||
'';
|
|
||||||
in ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
${
|
|
||||||
if stdenv.hostPlatform.isDarwin
|
|
||||||
then darwin
|
|
||||||
else linux
|
|
||||||
}
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
|
||||||
makeWrapper ${lib.getExe electron} $out/bin/${mainProgram} \
|
|
||||||
--add-flags $out/share/app.asar \
|
|
||||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
|
||||||
--set-default ELECTRON_FORCE_IS_PACKAGED 1 \
|
|
||||||
--set-default ELECTRON_IS_DEV 0 \
|
|
||||||
--inherit-argv0
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Desktop application for Mail and Calendar, made with Electron";
|
|
||||||
homepage = "https://github.com/ProtonMail/inbox-desktop";
|
|
||||||
license = lib.licenses.gpl3Plus;
|
|
||||||
platforms = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
"aarch64-darwin"
|
|
||||||
];
|
|
||||||
sourceProvenance = [lib.sourceTypes.binaryNativeCode];
|
|
||||||
inherit mainProgram;
|
|
||||||
};
|
|
||||||
}) {};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue