feat: switch to nixpkgs tutanota and make overlay for latest version

This commit is contained in:
matt1432 2023-08-12 12:31:35 -04:00
parent 815b72adb8
commit 392f3771c1
4 changed files with 18 additions and 64 deletions

View file

@ -68,7 +68,7 @@
exec env SUDO_ASKPASS=${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@"
'')
tutanota
tutanota-desktop
swayosd
blueberry
libayatana-appindicator

View file

@ -4,10 +4,7 @@
nixpkgs.overlays = [
(import ./swayosd.nix)
(import ./blueberry.nix)
(final: prev: {
tutanota = final.callPackage ./pkgs/tutanota.nix {};
})
(import ./tutanota-desktop.nix)
(final: prev: {
pam-fprint-grosshack = final.callPackage ./pkgs/pam-fprint-grosshack.nix {};

View file

@ -1,59 +0,0 @@
{ lib
, pkgs
, stdenv
, appimageTools
, makeWrapper
, fetchurl
, libGL
, libsecret
, xorg
, ffmpeg
, curl
, alsa-lib
, udev
}:
let
pname = "tutanota-desktop";
version = "3.114.1";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/tutao/tutanota/releases/download/tutanota-desktop-release-${version}/tutanota-desktop-linux.AppImage";
hash = "sha256-cWK95F3/zRyKt2fN/uN/dfDNnSiXgJq6mlGjtD3W7VY=";
};
extracted = appimageTools.extractType2 {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit name src;
profile = ''
export LD_LIBRARY_PATH=${libGL}:${libsecret}:${ffmpeg}:${curl}:${alsa-lib}:${udev}:$LD_LIBRARY_PATH
'';
targetPkgs = pkgs: [ libGL libsecret ffmpeg curl alsa-lib udev ];
extraInstallCommands = ''
mkdir -p $out/bin $out/share/applications
cp -r ${extracted}/* $out/
ln -s $out/tutanota-desktop $out/bin/tutanota-desktop
mv $out/tutanota-desktop.desktop $out/share/applications/
substituteInPlace $out/share/applications/tutanota-desktop.desktop \
--replace AppRun ${pname}
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/${pname} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret stdenv.cc.cc.lib ]}
sed -i 's#exec -a "$0"#exec -a "$0" "${pkgs.steam-run}/bin/steam-run"#' "$out/bin/${pname}"
'';
}

View file

@ -0,0 +1,16 @@
final: prev: {
tutanota-desktop = prev.tutanota-desktop.overrideAttrs (oldAttrs: rec {
pname = "tutanota-desktop";
version = "3.116.8";
src = prev.fetchurl {
url = "https://github.com/tutao/tutanota/releases/download/tutanota-desktop-release-${version}/${pname}-${version}-unpacked-linux.tar.gz";
name = "tutanota-desktop-${version}.tar.gz";
sha256 = "sha256-HY0LdiHz8G/v8/zEglRtoDyPFMhMj1Zrc0zpQNJpWr0=";
};
patches = [];
});
}