trilium: 0.101.3 -> 0.102.0 (#496939)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
fetchurl,
|
||||
makeBinaryWrapper,
|
||||
# use specific electron since it has to load a compiled module
|
||||
electron_39,
|
||||
electron_40,
|
||||
autoPatchelfHook,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
let
|
||||
pname = "trilium-desktop";
|
||||
version = "0.101.3";
|
||||
version = "0.102.0";
|
||||
|
||||
triliumSource = os: arch: hash: {
|
||||
url = "https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-v${version}-${os}-${arch}.zip";
|
||||
@@ -26,10 +26,10 @@ let
|
||||
darwinSource = triliumSource "macos";
|
||||
|
||||
# exposed like this for update.sh
|
||||
x86_64-linux.hash = "sha256-+Q0RfWa9wl0SEb5hiT9q9+careuLgZh7Bgpi8HuUFyA=";
|
||||
aarch64-linux.hash = "sha256-r8CJBBiSzgNpZ5K3FKwKR84xqm90pxgBEj1NVbRfQos=";
|
||||
x86_64-darwin.hash = "sha256-oprNyKQs8sPPrm67SyTxvlgGuRKJ0OcVJ4OGAsOT6rQ=";
|
||||
aarch64-darwin.hash = "sha256-1VXeU+a1tw4fhlZX0r88BkIo/wXBvWEFBzloBjVvouk=";
|
||||
x86_64-linux.hash = "sha256-/M7Quq7tgnrp/x7845fA041snC4ybIxculA3IXah5zs=";
|
||||
aarch64-linux.hash = "sha256-9ONccvxAhPrO3Sj1wSlb93G0zrtEiD4jD0vyr3W11X0=";
|
||||
x86_64-darwin.hash = "sha256-yaxv5LynfCOdNMHjmV3uFDBzlxtSZCDOFnUV577z8N8=";
|
||||
aarch64-darwin.hash = "sha256-Rr3da4R/7rT5ippGE38RWOGT+W0yXp5S43Mo1nFdzMw=";
|
||||
|
||||
sources = {
|
||||
x86_64-linux = linuxSource "x64" x86_64-linux.hash;
|
||||
@@ -111,7 +111,7 @@ let
|
||||
asar pack $tmp/ $out/share/trilium/resources/app.asar
|
||||
rm -rf $tmp
|
||||
|
||||
makeWrapper ${lib.getExe electron_39} $out/bin/trilium \
|
||||
makeWrapper ${lib.getExe electron_40} $out/bin/trilium \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--set-default ELECTRON_IS_DEV 0 \
|
||||
--add-flags $out/share/trilium/resources/app.asar
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p coreutils curl jq
|
||||
#!nix-shell -i bash -p coreutils curl jq gnused
|
||||
set -euo pipefail
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")
|
||||
@@ -8,7 +8,11 @@ setKV () {
|
||||
sed -i "s|$2 = \".*\"|$2 = \"${3:-}\"|" $1
|
||||
}
|
||||
|
||||
version=$(curl -s --show-error "https://api.github.com/repos/TriliumNext/Trilium/releases/latest" | jq -r '.tag_name' | tail -c +2)
|
||||
curl_github() {
|
||||
curl -s --show-error -L ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
|
||||
}
|
||||
|
||||
version=$(curl_github "https://api.github.com/repos/TriliumNext/Trilium/releases/latest" | jq -r '.tag_name' | tail -c +2)
|
||||
setKV ./package.nix version $version
|
||||
|
||||
# Update desktop application
|
||||
@@ -20,6 +24,8 @@ setKV ./package.nix x86_64-linux.hash $sha256_linux64
|
||||
setKV ./package.nix aarch64-linux.hash $sha256_linux64_arm
|
||||
setKV ./package.nix x86_64-darwin.hash $sha256_darwin64
|
||||
setKV ./package.nix aarch64-darwin.hash $sha256_darwin64_arm
|
||||
electronVersion=$(curl_github "https://raw.githubusercontent.com/TriliumNext/Trilium/v$version/apps/desktop/package.json" | jq -r ".devDependencies.electron" | sed -r 's|^\^?([0-9]+).*|\1|')
|
||||
sed -r "s|(electron_)[0-9]+|\1$electronVersion|" -i ./package.nix
|
||||
|
||||
# Update server
|
||||
sha256_linux64_server=$(nix store prefetch-file --json --hash-type sha256 https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-Server-v${version}-linux-x64.tar.xz | jq -r .hash)
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.101.3";
|
||||
version = "0.102.0";
|
||||
|
||||
serverSource_x64.url = "https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-Server-v${version}-linux-x64.tar.xz";
|
||||
serverSource_x64.hash = "sha256-WbEv3B1axs8UI7uj4JRW0hQKEfkKfiLxtQWbNgiYeos=";
|
||||
serverSource_x64.hash = "sha256-EC4Ige8ox2+twzpsQcT0DDjZlP74zpHSk2IAK6txcJs=";
|
||||
serverSource_arm64.url = "https://github.com/TriliumNext/Trilium/releases/download/v${version}/TriliumNotes-Server-v${version}-linux-arm64.tar.xz";
|
||||
serverSource_arm64.hash = "sha256-k1mtBqw6BGqe7/kwoMl8N01BShVRTxMxnTxkYkwGbCc=";
|
||||
serverSource_arm64.hash = "sha256-uXFm5mzkYeupSTUnBgnyBa9oEP6px0ATINEN0imQbdw=";
|
||||
|
||||
serverSource =
|
||||
if stdenv.hostPlatform.isx86_64 then
|
||||
|
||||
Reference in New Issue
Block a user