Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trilium-next-{desktop,server}: init at 0.90.12 #356930

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

FliegendeWurst
Copy link
Member

New package, based on the old Trilium.

cc @eliandoran

Closes #348144
Closes #339237

Things done


Add a 👍 reaction to pull requests you find important.

@FliegendeWurst FliegendeWurst mentioned this pull request Nov 18, 2024
13 tasks
@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 18, 2024
@FliegendeWurst FliegendeWurst added the backport release-24.11 Backport PR automatically label Nov 18, 2024
@FliegendeWurst FliegendeWurst force-pushed the trilium-next branch 3 times, most recently from 741c113 to ccda165 Compare November 18, 2024 11:49
Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@FliegendeWurst
Copy link
Member Author

@ofborg build trilium-next-desktop trilium-next-server

(internal ofborg error)

@Pleune
Copy link
Contributor

Pleune commented Dec 5, 2024

Would it make sense to build the packages instead of fetching them from GitHub releases?

For the server, the build script is a little messy but I think most of this can be skipped. The desktop app is a little more involved, but this would let us use the nix-patched electron.

@FliegendeWurst
Copy link
Member Author

The desktop app is a little more involved, but this would let us use the nix-patched electron.

Unfortunately the desktop app uses electron-forge, which is used by no other packages in nixpkgs. I tried to build from source a while ago, and it wasn't really possible..

@FliegendeWurst
Copy link
Member Author

Note that we already use nixpkgs' electron to create the wrapper.

@FliegendeWurst
Copy link
Member Author

FliegendeWurst commented Dec 5, 2024

My previous attempt at a source build: https://github.com/FliegendeWurst/nixpkgs/blob/b37e2e7c3479d893d5acf9acf4566ae2e72b22f8/pkgs/applications/office/trilium-next/desktop.nix

@eliandoran
Copy link
Contributor

Hi, @FliegendeWurst .

We should probably update to v0.90.12 which is the latest stable version.

diff --git a/pkgs/by-name/tr/trilium-next-desktop/package.nix b/pkgs/by-name/tr/trilium-next-desktop/package.nix
index 33e09385b26d..0e72c1e9833d 100644
--- a/pkgs/by-name/tr/trilium-next-desktop/package.nix
+++ b/pkgs/by-name/tr/trilium-next-desktop/package.nix
@@ -16,13 +16,13 @@
 
 let
   pname = "trilium-next-desktop";
-  version = "0.90.8";
+  version = "0.90.12";
 
   linuxSource.url = "https://github.com/TriliumNext/Notes/releases/download/v${version}/TriliumNextNotes-v${version}-linux-x64.zip";
-  linuxSource.sha256 = "0l9a2l79jcbr4522k03bbzli9gv96pr15cyig6fg9qpf71cjvda1";
+  linuxSource.sha256 = "0ji28l60wyzhjbi6g5845dnm763bvg7535zfgzcmfgwjs6zr6nfq";
 
   darwinSource.url = "https://github.com/TriliumNext/Notes/releases/download/v${version}/TriliumNextNotes-v${version}-macos-x64.zip";
-  darwinSource.sha256 = "0wki6a6bpp698r51wvyl7xh8y8csj5yaihaxfplp8q33zp9nw2q8";
+  darwinSource.sha256 = "0jv80k7dk6gpyfj36iin6y7fk7qan4bya72f14jcgfla95wvk6ls";
 
   meta = {
     description = "Hierarchical note taking application with focus on building large personal knowledge bases";
@@ -89,7 +89,7 @@ let
       asar extract $out/share/trilium/resources/app.asar $tmp
       rm $out/share/trilium/resources/app.asar
 
-      for f in "src/services/i18n.ts" "dist/src/services/i18n.js" "dist/src/build/src/services/i18n.js" "build/src/services/i18n.js"; do
+      for f in "src/services/utils.ts" "dist/src/services/utils.js"; do
         substituteInPlace $tmp/$f \
           --replace-fail "process.resourcesPath" "'$out/share/trilium/resources'"
       done
diff --git a/pkgs/by-name/tr/trilium-next-server/package.nix b/pkgs/by-name/tr/trilium-next-server/package.nix
index 3544ef30885a..5d48f2b71184 100644
--- a/pkgs/by-name/tr/trilium-next-server/package.nix
+++ b/pkgs/by-name/tr/trilium-next-server/package.nix
@@ -8,10 +8,10 @@
 }:
 
 let
-  version = "0.90.8";
+  version = "0.90.12";
 
   serverSource.url = "https://github.com/TriliumNext/Notes/releases/download/v${version}/TriliumNextNotes-v${version}-server-linux-x64.tar.xz";
-  serverSource.sha256 = "0ax2z3siaxvmdiasn3ddll0yvllkyi3g2xbks5h6vmgh59ivjh2x";
+  serverSource.sha256 = "0gvb01cj334n805rs230xwwcv4rf2z2giikpagw8wqrs54gy3b35";
 in
 stdenv.mkDerivation {
   pname = "trilium-next-server";

@eliandoran
Copy link
Contributor

@FliegendeWurst ,

(by the way, are the docs at https://github.com/TriliumNext/Notes/tree/develop/docs hosted somewhere on the Github pages?)

They are hosted at https://triliumnext.github.io/Notes but they are slightly out of date as we are struggling a bit to get the documentation to be hosted on a TriliumNext instance.

A more up to date version of these documents can be found at https://elian-trilium.pikapod.net/share/4yYHqKbLovVX . It will be relocated to the TriliumNext documentation instance.

The latest version of the user-facing documentation is available here: https://triliumnext.pikapod.net/share/

Copy link
Contributor

@eliandoran eliandoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also don't forget to rename the PR to reflect the change in version to v0.90.12.

pkgs/by-name/tr/trilium-next-desktop/package.nix Outdated Show resolved Hide resolved
@FliegendeWurst FliegendeWurst changed the title trilium-next-{desktop,server}: init at 0.90.8 trilium-next-{desktop,server}: init at 0.90.12 Dec 9, 2024
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Dec 9, 2024
@ofborg ofborg bot requested a review from eliandoran December 10, 2024 06:41
@wegank wegank added the 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package label Dec 10, 2024
@BeatLink
Copy link

Any updates on this? It would make a great Christmas present if this could be implemented 😁

@eliandoran
Copy link
Contributor

@SuperSandro2000 , would appreciate a review.

@BeatLink
Copy link

Is there a way to run this while it is pending approval?

@fabian-mv
Copy link

@BeatLink simply clone the module and use it

@BeatLink
Copy link

This was working up to a few days ago where electron_31 failed to build. I'm getting these errors

warning: Git tree '/Storage/TechNet' is dirty
building the system configuration...
warning: Git tree '/Storage/TechNet' is dirty
error: builder for '/nix/store/3xmv4rw48h2dfl4ij77dmqjzhiq4rli4-electron-unwrapped-31.7.6.drv' failed with exit code 1;
       last 25 log lines:
       >       |                    ^
       > ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:337:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       >   337 |     Base::template CallIfEnabled(
       >       |                    ^
       > ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:352:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       >   352 |     Base::template Trace([&](typename Base::TraceContext ctx) {
       >       |                    ^
       > ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:499:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       >   499 |     Base::template Trace([&](typename Base::TraceContext ctx) {
       >       |                    ^
       > ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1050:22: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       >  1050 |       Base::template TraceWithInstances(instances, std::move(lambda));
       >       |                      ^
       > ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1064:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       >  1064 |     Base::template Trace([&](typename Base::TraceContext ctx) {
       >       |                    ^
       > 6 errors generated.
       > [2641/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/track_event_state_tracker.o
       > [2642/50420] CXX obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_tracker.o
       > [2643/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/tracing.o
       > [2644/50420] CXX obj/third_party/perfetto/src/trace_processor/importers/proto/minimal/track_event_parser.o
       > [2645/50420] CXX obj/third_party/perfetto/src/tracing/ipc/producer/producer/producer_ipc_client_impl.o
       > [2646/50420] CXX obj/third_party/perfetto/src/tracing/ipc/consumer/consumer/consumer_ipc_client_impl.o
       > [2647/50420] CXX obj/third_party/perfetto/src/tracing/client_api_without_backends/tracing_muxer_impl.o
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/3xmv4rw48h2dfl4ij77dmqjzhiq4rli4-electron-unwrapped-31.7.6.drv'.
error: 1 dependencies of derivation '/nix/store/gdv223k0cfmci49q0pp722wg8fpxra7s-electron-31.7.6.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nb88gsiq91vqgi947sw5sg03vg2ras1n-trilium-next-desktop-0.91.2-beta.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c6sp2ryjlpbdwh42hkhn8rn0wzr9gx7d-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wdbkn10s585ppfd6dx31429ngdylsa3x-nixos-system-Odin-25.05.20241229.88195a9.drv' failed to build

[beatlink@Odin:/Storage/TechNet]$ upgrade

@BeatLink
Copy link

BeatLink commented Dec 31, 2024

Never mind, seems to be resolved here #368966

@fabian-mv
Copy link

@SuperSandro2000 would appreciate a review :)

@BeatLink
Copy link

Bumping. Any updates?

Been running this build manually for a few weeks. It works a treat!

Copy link
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has worked fine for me.

pkgs/by-name/tr/trilium-next-server/package.nix Outdated Show resolved Hide resolved
@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Jan 12, 2025
@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Jan 12, 2025
@FliegendeWurst FliegendeWurst merged commit 618c81f into NixOS:master Jan 15, 2025
25 of 28 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jan 15, 2025

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package request: TriliumNext-server and TriliumNext-desktop
8 participants