patchwork: 3.11.4 -> 3.14.1 (#63593)

patchwork: 3.11.4 -> 3.14.1
This commit is contained in:
Florian Klink 2019-06-22 22:38:32 +02:00 committed by GitHub
commit 9b53eb74d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,46 +1,53 @@
{ { appimageTools, symlinkJoin, lib, fetchurl, makeDesktopItem }:
stdenv,
appimage-run,
fetchurl,
runtimeShell,
gsettings-desktop-schemas,
gtk3,
gobject-introspection,
wrapGAppsHook,
}:
stdenv.mkDerivation rec { let
# latest version that runs without errors
# https://github.com/ssbc/patchwork/issues/972
version = "3.11.4";
pname = "patchwork"; pname = "patchwork";
version = "3.14.1";
name = "${pname}-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/ssbc/patchwork/releases/download/v${version}/Patchwork-${version}-linux-x86_64.AppImage"; url = "https://github.com/ssbc/patchwork/releases/download/v${version}/ssb-${pname}-${version}-x86_64.AppImage";
sha256 = "1blsprpkvm0ws9b96gb36f0rbf8f5jgmw4x6dsb1kswr4ysf591s"; sha256 = "01vsldabv9nmbx8kzlgw275zykm72s1dxglnaq4jz5vbysbyn0qd";
}; };
nativeBuildInputs = [ wrapGAppsHook ]; binary = appimageTools.wrapType2 {
buildInputs = [ appimage-run gtk3 gsettings-desktop-schemas gobject-introspection ]; name = "${pname}";
inherit src;
};
# we only use this to extract the icon
appimage-contents = appimageTools.extractType2 {
inherit name src;
};
unpackPhase = ":"; desktopItem = makeDesktopItem {
name = "patchwork";
exec = "${binary}/bin/patchwork";
icon = "ssb-patchwork.png";
comment = "Decentralized messaging and sharing app";
desktopName = "Patchwork";
genericName = "Patchwork";
categories = "Network;";
};
installPhase = '' in
mkdir -p $out/{bin,share} symlinkJoin {
cp $src $out/share/${pname} inherit name;
echo "#!${runtimeShell}" > $out/bin/${pname} paths = [ binary ];
echo "${appimage-run}/bin/appimage-run $out/share/${pname}" >> $out/bin/${pname}
chmod +x $out/bin/${pname} $out/share/${pname}
'';
meta = with stdenv.lib; { postBuild = ''
description = "A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)."; mkdir -p $out/share/pixmaps/ $out/share/applications
cp ${appimage-contents}/ssb-patchwork.png $out/share/pixmaps
cp ${desktopItem}/share/applications/* $out/share/applications/
'';
meta = with lib; {
description = "A decentralized messaging and sharing app built on top of Secure Scuttlebutt (SSB)";
longDescription = '' longDescription = ''
sea-slang for gossip - a scuttlebutt is basically a watercooler on a ship. sea-slang for gossip - a scuttlebutt is basically a watercooler on a ship.
''; '';
homepage = https://www.scuttlebutt.nz/; homepage = https://www.scuttlebutt.nz/;
license = licenses.agpl3; license = licenses.agpl3;
maintainers = with maintainers; [ thedavidmeister ]; maintainers = with maintainers; [ thedavidmeister ninjatrappeur flokli ];
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
}; };
} }