From 89139c637235f55636445cb3682c0458ed12c5ff Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Sun, 14 Nov 2021 17:04:13 +0100 Subject: [PATCH] trilium: 0.47.8 -> 0.48.6 --- ...sole-logger-instead-of-rolling-files.patch | 43 ++++++++++++++++++- pkgs/applications/office/trilium/default.nix | 10 ++--- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/office/trilium/0001-Use-console-logger-instead-of-rolling-files.patch b/pkgs/applications/office/trilium/0001-Use-console-logger-instead-of-rolling-files.patch index 5bda63b58451..0cb26afe8296 100644 --- a/pkgs/applications/office/trilium/0001-Use-console-logger-instead-of-rolling-files.patch +++ b/pkgs/applications/office/trilium/0001-Use-console-logger-instead-of-rolling-files.patch @@ -1,5 +1,5 @@ diff --git a/src/services/log.js b/src/services/log.js -index 1345ce39..a9770516 100644 +index 4f29994..1e89e0a 100644 --- a/src/services/log.js +++ b/src/services/log.js @@ -1,14 +1,5 @@ @@ -47,7 +47,7 @@ index 1345ce39..a9770516 100644 - if (millisSinceMidnight >= DAY) { - initLogFile(); - -- millisSinceMidnight =- DAY; +- millisSinceMidnight -= DAY; - } - - return millisSinceMidnight; @@ -62,3 +62,42 @@ index 1345ce39..a9770516 100644 - console.log(str); } + +@@ -83,37 +36,6 @@ function request(req, res, timeMs, responseLength = "?") { + `${res.statusCode} ${req.method} ${req.url} with ${responseLength} bytes took ${timeMs}ms`); + } + +-function pad(num) { +- num = Math.floor(num); +- +- return num < 10 ? ("0" + num) : num.toString(); +-} +- +-function padMilli(num) { +- if (num < 10) { +- return "00" + num; +- } +- else if (num < 100) { +- return "0" + num; +- } +- else { +- return num.toString(); +- } +-} +- +-function formatTime(millisSinceMidnight) { +- return pad(millisSinceMidnight / HOUR) +- + ":" + pad((millisSinceMidnight % HOUR) / MINUTE) +- + ":" + pad((millisSinceMidnight % MINUTE) / SECOND) +- + "." + padMilli(millisSinceMidnight % SECOND); +-} +- +-function formatDate() { +- return pad(todaysMidnight.getFullYear()) +- + "-" + pad(todaysMidnight.getMonth() + 1) +- + "-" + pad(todaysMidnight.getDate()); +-} +- + module.exports = { + info, + error, diff --git a/pkgs/applications/office/trilium/default.nix b/pkgs/applications/office/trilium/default.nix index 6cfdf3c8f925..528b6786290a 100644 --- a/pkgs/applications/office/trilium/default.nix +++ b/pkgs/applications/office/trilium/default.nix @@ -19,16 +19,16 @@ let maintainers = with maintainers; [ fliegendewurst ]; }; - version = "0.47.8"; + version = "0.48.6"; desktopSource = { url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-${version}.tar.xz"; - sha256 = "1vnwjiv4bidw5xspcd7d7fn8dbhvgia9ws363fs5zs48c9k2hwwz"; + sha256 = "1n7gm6mwzf5yyk8cpn70029p1iiv26bypyfi42sx14yyjvlny4rm"; }; serverSource = { url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-server-${version}.tar.xz"; - sha256 = "1clgw0i3vbl8lrsjdjbn71yhim6356gm8h24831mnksb4sawhh7f"; + sha256 = "0z7cbw11mqf2mfv6ixnczg2i4jcdpvryzl0521ai26gq42jyyy0r"; }; in { @@ -44,8 +44,8 @@ in { # (they did special-case icon.png but we want the scalable svg) # Use the version here to ensure we get any changes. trilium_svg = fetchurl { - url = "https://raw.githubusercontent.com/zadam/trilium/v${version}/images/trilium.svg"; - sha256 = "1rgj7pza20yndfp8n12k93jyprym02hqah36fkk2b3if3kcmwnfg"; + url = "https://raw.githubusercontent.com/zadam/trilium/v${version}/images/icon.svg"; + sha256 = "0sz3piskdlx267whx8r6afrdadn25bf0zmxplj1599zqkf7w7n0x"; };