From 8b7d6f8b0a09f7db74cbce56cf6f1b4bad58d93a Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 20 Jun 2024 08:24:45 -0300 Subject: [PATCH] logseq: fix build, move to by-name --- .../logseq/default.nix => by-name/lo/logseq/package.nix} | 8 +++++--- pkgs/top-level/all-packages.nix | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) rename pkgs/{applications/misc/logseq/default.nix => by-name/lo/logseq/package.nix} (88%) diff --git a/pkgs/applications/misc/logseq/default.nix b/pkgs/by-name/lo/logseq/package.nix similarity index 88% rename from pkgs/applications/misc/logseq/default.nix rename to pkgs/by-name/lo/logseq/package.nix index 7dfee5ca9dfdd..793e305ac3a45 100644 --- a/pkgs/applications/misc/logseq/default.nix +++ b/pkgs/by-name/lo/logseq/package.nix @@ -3,8 +3,10 @@ , fetchurl , appimageTools , makeWrapper -# graphs will not sync without matching upstream's major electron version -, electron_27 +# Notice: graphs will not sync without matching upstream's major electron version +# the specific electron version is set at top-level file to preserve override interface. +# whenever updating this package also sync electron version at top-level file. +, electron , autoPatchelfHook , git , nix-update-script @@ -59,7 +61,7 @@ in { postFixup = '' # set the env "LOCAL_GIT_DIRECTORY" for dugite so that we can use the git in nixpkgs - makeWrapper ${electron_27}/bin/electron $out/bin/${pname} \ + makeWrapper ${electron}/bin/electron $out/bin/${pname} \ --set "LOCAL_GIT_DIRECTORY" ${git} \ --add-flags $out/share/${pname}/resources/app \ --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 51d42873a4279..674d9cfa343f2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3060,8 +3060,6 @@ with pkgs; lilo = callPackage ../tools/misc/lilo { }; - logseq = callPackage ../applications/misc/logseq { }; - natls = callPackage ../tools/misc/natls { }; notion-app-enhanced = callPackage ../applications/office/notion-app-enhanced { }; @@ -5696,6 +5694,11 @@ with pkgs; loccount = callPackage ../development/tools/misc/loccount { }; + logseq = callPackage ../by-name/lo/logseq/package.nix { + # electron version from: https://github.com/logseq/logseq/blob/d8c6ca264bdf9a6a0f03c46dbf3509210367624a/package.json#L116 + electron = electron_28; + }; + long-shebang = callPackage ../misc/long-shebang { }; lssecret = callPackage ../misc/lssecret {};