feat: make own derivation of tutanota from AppImage
This commit is contained in:
parent
0af2140e03
commit
7631eee402
2 changed files with 57 additions and 1 deletions
|
@ -72,10 +72,12 @@
|
||||||
exec env SUDO_ASKPASS=${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@"
|
exec env SUDO_ASKPASS=${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@"
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
(with import <nixpkgs> {}; callPackage ../overlays/tutanota.nix {})
|
||||||
swayosd
|
swayosd
|
||||||
blueberry
|
blueberry
|
||||||
libayatana-appindicator
|
libayatana-appindicator
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
|
steam-run
|
||||||
qt5.qtwayland
|
qt5.qtwayland
|
||||||
qt6.qtwayland
|
qt6.qtwayland
|
||||||
httrack
|
httrack
|
||||||
|
@ -113,7 +115,6 @@
|
||||||
rofi-wayland
|
rofi-wayland
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
tutanota-desktop
|
|
||||||
galaxy-buds-client
|
galaxy-buds-client
|
||||||
swaynotificationcenter
|
swaynotificationcenter
|
||||||
swayidle
|
swayidle
|
||||||
|
|
55
nixos/overlays/tutanota.nix
Normal file
55
nixos/overlays/tutanota.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{ 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
|
||||||
|
|
||||||
|
cp -r ${extracted}/* $out/
|
||||||
|
|
||||||
|
ln -s $out/tutanota-desktop $out/bin/tutanota-desktop
|
||||||
|
|
||||||
|
substituteInPlace $out/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}"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue