logseq: init at 0.0.13

authored by

Weihua Lu and committed by
tomberek
bf4a3c20 8efca926

+61
+52
pkgs/applications/misc/logseq/default.nix
··· 1 + { lib, stdenv, fetchurl, appimageTools, makeWrapper, electron }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "logseq"; 5 + version = "0.0.13"; 6 + 7 + src = fetchurl { 8 + url = "https://github.com/logseq/logseq/releases/download/${version}/logseq-linux-x64-${version}.AppImage"; 9 + sha256 = "0a7c33f7d5ylcy6lqkpxp78wwyi4n5q4jdy7b8nx7p34sn2jnpf7"; 10 + name = "${pname}-${version}.AppImage"; 11 + }; 12 + 13 + appimageContents = appimageTools.extract { 14 + name = "${pname}-${version}"; 15 + inherit src; 16 + }; 17 + 18 + dontUnpack = true; 19 + dontConfigure = true; 20 + dontBuild = true; 21 + 22 + nativeBuildInputs = [ makeWrapper ]; 23 + 24 + installPhase = '' 25 + runHook preInstall 26 + 27 + mkdir -p $out/bin $out/share/${pname} $out/share/applications 28 + cp -a ${appimageContents}/{locales,resources} $out/share/${pname} 29 + cp -a ${appimageContents}/Logseq.desktop $out/share/applications/${pname}.desktop 30 + 31 + substituteInPlace $out/share/applications/${pname}.desktop \ 32 + --replace Exec=Logseq Exec=${pname} \ 33 + --replace Icon=Logseq Icon=$out/share/${pname}/resources/app/icons/logseq.png 34 + 35 + runHook postInstall 36 + ''; 37 + 38 + postFixup = '' 39 + makeWrapper ${electron}/bin/electron $out/bin/${pname} \ 40 + --add-flags $out/share/${pname}/resources/app 41 + ''; 42 + 43 + passthru.updateScript = ./update.sh; 44 + 45 + meta = with lib; { 46 + description = "A local-first, non-linear, outliner notebook for organizing and sharing your personal knowledge base"; 47 + homepage = "https://github.com/logseq/logseq"; 48 + license = licenses.agpl3Plus; 49 + maintainers = with maintainers; [ weihua ]; 50 + platforms = [ "x86_64-linux" ]; 51 + }; 52 + }
+5
pkgs/applications/misc/logseq/update.sh
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p curl jq common-updater-scripts 3 + 4 + version="$(curl -sL "https://api.github.com/repos/logseq/logseq/releases" | jq '.[0].tag_name' --raw-output)" 5 + update-source-version logseq "$version"
+4
pkgs/top-level/all-packages.nix
··· 820 820 flavour = "git"; 821 821 }; 822 822 823 + logseq = callPackage ../applications/misc/logseq { 824 + electron = electron_11; 825 + }; 826 + 823 827 lxterminal = callPackage ../applications/terminal-emulators/lxterminal { }; 824 828 825 829 microcom = callPackage ../applications/terminal-emulators/microcom { };