1{
2 appimageTools,
3 symlinkJoin,
4 lib,
5 fetchurl,
6 makeDesktopItem,
7}:
8
9let
10 pname = "ssb-patchwork";
11 version = "3.18.1";
12 name = "Patchwork-${version}";
13
14 src = fetchurl {
15 url = "https://github.com/ssbc/patchwork/releases/download/v${version}/${name}.AppImage";
16 sha256 = "F8n6LLbgkg3z55lSY60T+pn2lra8aPt6Ztepw1gf2rI=";
17 };
18
19 binary = appimageTools.wrapType2 {
20 inherit pname version src;
21 };
22 # we only use this to extract the icon
23 appimage-contents = appimageTools.extractType2 {
24 inherit pname version src;
25 };
26
27 desktopItem = makeDesktopItem {
28 name = "ssb-patchwork";
29 exec = "${binary}/bin/ssb-patchwork";
30 icon = "ssb-patchwork";
31 comment = "Client for the decentralized social network Secure Scuttlebutt";
32 desktopName = "Patchwork";
33 genericName = "Patchwork";
34 categories = [ "Network" ];
35 };
36
37in
38symlinkJoin {
39 inherit name;
40 paths = [ binary ];
41
42 postBuild = ''
43 mkdir -p $out/share/pixmaps/ $out/share/applications
44 cp ${appimage-contents}/ssb-patchwork.png $out/share/pixmaps
45 cp ${desktopItem}/share/applications/* $out/share/applications/
46 '';
47
48 meta = with lib; {
49 description = "Decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)";
50 longDescription = ''
51 sea-slang for gossip - a scuttlebutt is basically a watercooler on a ship.
52 '';
53 homepage = "https://www.scuttlebutt.nz/";
54 license = licenses.agpl3Only;
55 maintainers = with maintainers; [
56 asymmetric
57 picnoir
58 cyplo
59 ];
60 mainProgram = "ssb-patchwork";
61 platforms = [ "x86_64-linux" ];
62 };
63}