about summary refs log tree commit diff
path: root/pkgs/by-name/so/sozi/package.nix
blob: 612aa93cde2dfec18eccc4f8260840ac0cac7290 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ appimageTools, lib, fetchurl }:
let
  pname = "sozi";
  version = "23.7.25-1690311612";

  src = fetchurl {
    url = "https://github.com/sozi-projects/Sozi/releases/download/v23.07/Sozi-${version}.AppImage";
    hash = "sha256-QHvgevv60ZTkkdt+IWaCuXt0XVnhe5Q5oROwa2LFie8=";
  };

  appimageContents = appimageTools.extract {
    inherit version pname src;
  };
in appimageTools.wrapType2 {
  inherit pname version src;

  extraPkgs = pkgs: with pkgs; [ polkit udev ];

  extraInstallCommands = ''
    install -m 444 -D ${appimageContents}/sozi.desktop -t $out/share/applications
    cp -r ${appimageContents}/usr/share/icons $out/share
    substituteInPlace $out/share/applications/sozi.desktop \
      --replace 'Exec=AppRun' 'Exec=sozi'
  '';

  meta = {
    description = "Zooming presentation editor and player";
    homepage = "https://sozi.baierouge.fr/";
    license = lib.licenses.mpl20;
    mainProgram = "sozi";
    maintainers = with lib.maintainers; [ srghma ];
    platforms = [ "x86_64-linux" ];
    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
  };
}