logseq: init at 0.0.13

This commit is contained in:
Weihua Lu 2021-03-21 00:57:39 +08:00 committed by tomberek
parent 8efca92631
commit bf4a3c208e
3 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,52 @@
{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron }:
stdenv.mkDerivation rec {
pname = "logseq";
version = "0.0.13";
src = fetchurl {
url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage";
sha256 = "0a7c33f7d5ylcy6lqkpxp78wwyi4n5q4jdy7b8nx7p34sn2jnpf7";
name = "${pname}-${version}.AppImage";
};
appimageContents = appimageTools.extract {
name = "${pname}-${version}";
inherit src;
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/${pname} $out/share/applications
cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
cp -a ${appimageContents}/Logseq.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace Exec=Logseq Exec=${pname} \
--replace Icon=Logseq Icon=$out/share/${pname}/resources/app/icons/logseq.png
runHook postInstall
'';
postFixup = ''
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
--add-flags $out/share/${pname}/resources/app
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "A local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base";
homepage = "https://github.com/logseq/logseq";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ weihua ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
version="$(curl -sL "https://api.github.com/repos/logseq/logseq/releases" | jq '.[0].tag_name' --raw-output)"
update-source-version logseq "$version"

View file

@ -820,6 +820,10 @@ in
flavour = "git";
};
logseq = callPackage ../applications/misc/logseq {
electron = electron_11;
};
lxterminal = callPackage ../applications/terminal-emulators/lxterminal { };
microcom = callPackage ../applications/terminal-emulators/microcom { };