mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 21:04:30 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.4 KiB
Nix
45 lines
1.4 KiB
Nix
{ lib
|
|
, appimageTools
|
|
, fetchurl
|
|
, gitUpdater
|
|
}:
|
|
|
|
appimageTools.wrapType2 rec {
|
|
pname = "tutanota-desktop";
|
|
version = "250.241025.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/tutao/tutanota/releases/download/tutanota-desktop-release-${version}/tutanota-desktop-linux.AppImage";
|
|
hash = "sha256-PhcrDjqRmR1NVBLVCuj5dcc+WskWeZ9dJXdtOUveyL0=";
|
|
};
|
|
|
|
extraPkgs = pkgs: [ pkgs.libsecret ];
|
|
|
|
extraInstallCommands =
|
|
let appimageContents = appimageTools.extract { inherit pname version src; };
|
|
in ''
|
|
install -Dm 444 ${appimageContents}/tutanota-desktop.desktop -t $out/share/applications
|
|
install -Dm 444 ${appimageContents}/tutanota-desktop.png -t $out/share/pixmaps
|
|
|
|
substituteInPlace $out/share/applications/tutanota-desktop.desktop \
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
url = "https://github.com/tutao/tutanota";
|
|
rev-prefix = "tutanota-desktop-release-";
|
|
allowedVersions = ".+\\.[0-9]{6}\\..+";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tuta official desktop client";
|
|
homepage = "https://tuta.com/";
|
|
changelog = "https://github.com/tutao/tutanota/releases/tag/tutanota-desktop-release-${version}";
|
|
license = licenses.gpl3Only;
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
maintainers = [ ];
|
|
mainProgram = "tutanota-desktop";
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|