Merge pull request #60135 from dtzWill/feature/joplin-appimagetools

joplin-desktop: appimageTools-ify
This commit is contained in:
Will Dietz 2019-04-26 00:18:00 -05:00 committed by GitHub
commit 20ba3c3f34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 18 deletions

View File

@ -1,31 +1,26 @@
{ stdenv, appimage-run, fetchurl, gsettings-desktop-schemas, gtk3, gobject-introspection, wrapGAppsHook }: { appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3 }:
let let
pname = "joplin-desktop";
version = "1.0.143"; version = "1.0.143";
sha256 = "1waglwxpr18a07m7ix9al6ac4hrdqzzqmy1qgp45b922nbkw9g10"; in appimageTools.wrapType2 rec {
in name = "${pname}-${version}";
stdenv.mkDerivation rec {
name = "joplin-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}-x86_64.AppImage"; url = "https://github.com/laurent22/joplin/releases/download/v${version}/Joplin-${version}-x86_64.AppImage";
inherit sha256; sha256 = "1waglwxpr18a07m7ix9al6ac4hrdqzzqmy1qgp45b922nbkw9g10";
}; };
nativeBuildInputs = [ wrapGAppsHook ];
buildInputs = [ appimage-run gtk3 gsettings-desktop-schemas gobject-introspection ];
unpackPhase = ":"; profile = ''
export LC_ALL=C.UTF-8
installPhase = '' export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
mkdir -p $out/{bin,share}
cp $src $out/share/joplin.AppImage
echo "#!/bin/sh" > $out/bin/joplin-desktop
echo "${appimage-run}/bin/appimage-run $out/share/joplin.AppImage" >> $out/bin/joplin-desktop
chmod +x $out/bin/joplin-desktop $out/share/joplin.AppImage
''; '';
meta = with stdenv.lib; { multiPkgs = null; # no 32bit needed
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = "mv $out/bin/{${name},${pname}}";
meta = with lib; {
description = "An open source note taking and to-do application with synchronisation capabilities"; description = "An open source note taking and to-do application with synchronisation capabilities";
longDescription = '' longDescription = ''
Joplin is a free, open source note taking and to-do application, which can Joplin is a free, open source note taking and to-do application, which can