nixpkgs/pkgs/by-name/pr/proton-pass/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.4 KiB
Nix
Raw Normal View History

2024-06-06 20:58:37 +00:00
{
lib,
stdenvNoCC,
fetchurl,
dpkg,
makeWrapper,
electron,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "proton-pass";
2024-08-25 20:56:23 +00:00
version = "1.22.1";
2024-06-06 20:58:37 +00:00
src = fetchurl {
url = "https://proton.me/download/PassDesktop/linux/x64/ProtonPass_${finalAttrs.version}.deb";
2024-08-25 20:56:23 +00:00
hash = "sha256-DIA54xxJ8Nhh8wb4p13yjdenqgTgenAH4Tmbqk3IXwo=";
2024-06-06 20:58:37 +00:00
};
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [
dpkg
makeWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r usr/share/ $out/
cp -r usr/lib/proton-pass/resources/app.asar $out/share/
runHook postInstall
'';
preFixup = ''
makeWrapper ${lib.getExe electron} $out/bin/proton-pass \
--add-flags $out/share/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
--set-default ELECTRON_FORCE_IS_PACKAGED 1 \
--set-default ELECTRON_IS_DEV 0 \
--inherit-argv0
'';
meta = {
description = "Desktop application for Proton Pass";
homepage = "https://proton.me/pass";
license = lib.licenses.gpl3Plus;
2024-08-19 08:34:19 +00:00
maintainers = with lib.maintainers; [
luftmensch-luftmensch
massimogengarelli
sebtm
];
2024-06-06 20:58:37 +00:00
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
mainProgram = "proton-pass";
};
})