signal-desktop-source: add update script; 7.48.0 -> 7.49.0 (#395596)
This commit is contained in:
commit
84e51a5f32
@ -12,7 +12,6 @@
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
nodejs,
|
||||
|
||||
}:
|
||||
let
|
||||
# boring-sys expects the static libraries in build/ instead of lib/
|
||||
@ -25,23 +24,23 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "libsignal-node";
|
||||
version = "0.67.3";
|
||||
version = "0.67.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "signalapp";
|
||||
repo = "libsignal";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-kZZS3IpmxFFuHMH4O1H+JLyf2zBTSr1RnuV0wrwZeXk=";
|
||||
hash = "sha256-s7vTzAOWKvGCkrWcxDcKptsmxvW5VxrF5X9Vfkjj1jA=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-ozroDfxDdBtyBEE0d7nf63wUqilBhakT/lxwYV/7V5I=";
|
||||
cargoHash = "sha256-wxBbq4WtqzHbdro+tm2hU6JVwTgC2X/Cx9po+ndgECg=";
|
||||
|
||||
npmRoot = "node";
|
||||
npmDeps = fetchNpmDeps {
|
||||
name = "${finalAttrs.pname}-npm-deps";
|
||||
inherit (finalAttrs) version src;
|
||||
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.npmRoot}";
|
||||
hash = "sha256-TpjpRDsKT/RCPxzV7mzfmZHI9QhH+OColGuEMSdVwBA=";
|
||||
hash = "sha256-GJTNuVK1YGDpx89fF6hXXd+/fEqnFMG5FgJUJhp6344=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -7,11 +7,9 @@
|
||||
python3,
|
||||
makeWrapper,
|
||||
callPackage,
|
||||
libpulseaudio,
|
||||
fetchFromGitHub,
|
||||
runCommand,
|
||||
fetchzip,
|
||||
autoPatchelfHook,
|
||||
jq,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
replaceVars,
|
||||
@ -29,29 +27,9 @@ let
|
||||
tar -C $out --strip-components=1 -xvf ${electron.headers}
|
||||
'';
|
||||
|
||||
sqlcipher-signal-extension = callPackage ./sqlcipher-signal-extension.nix { };
|
||||
libsignal-node = callPackage ./libsignal-node.nix { inherit nodejs; };
|
||||
|
||||
ringrtc = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ringrtc-bin";
|
||||
version = "2.50.2";
|
||||
src = fetchzip {
|
||||
url = "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-hNlz+gSulyJ//FdbPvY/5OHbtJ4rEUdi9/SHJDX6gZE=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r . $out
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
buildInputs = [ libpulseaudio ];
|
||||
meta = {
|
||||
homepage = "https://github.com/signalapp/ringrtc";
|
||||
license = lib.licenses.agpl3Only;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
});
|
||||
ringrtc-bin = callPackage ./ringrtc-bin.nix { };
|
||||
|
||||
# Noto Color Emoji PNG files for emoji replacement; see below.
|
||||
noto-fonts-color-emoji-png = noto-fonts-color-emoji.overrideAttrs (prevAttrs: {
|
||||
@ -74,16 +52,16 @@ let
|
||||
'';
|
||||
});
|
||||
|
||||
version = "7.48.0";
|
||||
version = "7.49.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "signalapp";
|
||||
repo = "Signal-Desktop";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-/jtuGsBOFsSgJZNpRilWZ0daI0iYVziZBaF/vLvQ7NU=";
|
||||
hash = "sha256-URWDSHiPK+DCh8giT8YFW2HNY0tYNokqbAKBpBWZKD0=";
|
||||
};
|
||||
|
||||
stickerCreator = stdenv.mkDerivation (finalAttrs: {
|
||||
sticker-creator = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "signal-desktop-sticker-creator";
|
||||
inherit version;
|
||||
src = src + "/sticker-creator";
|
||||
@ -121,6 +99,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
makeWrapper
|
||||
copyDesktopItems
|
||||
python3
|
||||
jq
|
||||
];
|
||||
buildInputs = (lib.optional (!withAppleEmojis) noto-fonts-color-emoji-png);
|
||||
|
||||
@ -139,21 +118,39 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
;
|
||||
hash =
|
||||
if withAppleEmojis then
|
||||
"sha256-xba5MfIjwnLHDKVM9+2KSpC3gcw6cM4cX3dn3/jqT3o="
|
||||
"sha256-QBlouzA3PhRGiL94sCQS/zRSdsFbKf4VI20x3seMpE4="
|
||||
else
|
||||
"sha256-I5UGY9Fz4wCa23snq0pir2uq/P+w+fAGU4Bks+CqEgk=";
|
||||
"sha256-LKSFptmJyfI0ACo1egZ2LAY5pAXexu9UNjIhD79rJ9E=";
|
||||
};
|
||||
|
||||
env = {
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
SIGNAL_ENV = "production";
|
||||
SOURCE_DATE_EPOCH = 1743538878;
|
||||
SOURCE_DATE_EPOCH = 1743627521;
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
cp ${sqlcipher-signal-extension}/share/sqlite3.gyp node_modules/@signalapp/better-sqlite3/deps/sqlite3.gyp
|
||||
if [ "`jq -r '.engines.node' < package.json | head -c 2`" != `head -c 2 <<< "${nodejs.version}"` ]
|
||||
then
|
||||
die "nodejs version mismatch"
|
||||
fi
|
||||
|
||||
cp -r ${ringrtc} node_modules/@signalapp/ringrtc/build
|
||||
if [ "`jq -r '.devDependencies.electron' < package.json | head -c 2`" != `head -c 2 <<< "${electron.version}"` ]
|
||||
then
|
||||
die "electron version mismatch"
|
||||
fi
|
||||
|
||||
if [ "`jq -r '.dependencies."@signalapp/libsignal-client"' < package.json`" != "${libsignal-node.version}" ]
|
||||
then
|
||||
die "libsignal-client version mismatch"
|
||||
fi
|
||||
|
||||
if [ "`jq -r '.dependencies."@signalapp/ringrtc"' < package.json`" != "${ringrtc-bin.version}" ]
|
||||
then
|
||||
die "ringrtc version mismatch"
|
||||
fi
|
||||
|
||||
cp -r ${ringrtc-bin} node_modules/@signalapp/ringrtc/build
|
||||
|
||||
rm -fr node_modules/@signalapp/libsignal-client/prebuilds
|
||||
cp -r ${libsignal-node}/lib node_modules/@signalapp/libsignal-client/prebuilds
|
||||
@ -165,7 +162,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
export npm_config_nodedir=${electron-headers}
|
||||
cp -r ${electron.dist} electron-dist
|
||||
chmod -R u+w electron-dist
|
||||
cp -r ${stickerCreator} sticker-creator/dist
|
||||
cp -r ${sticker-creator} sticker-creator/dist
|
||||
|
||||
pnpm run generate
|
||||
pnpm exec electron-builder \
|
||||
@ -219,8 +216,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit sqlcipher-signal-extension libsignal-node;
|
||||
inherit
|
||||
libsignal-node
|
||||
ringrtc-bin
|
||||
sticker-creator
|
||||
;
|
||||
tests.application-launch = nixosTests.signal-desktop;
|
||||
updateScript.command = [ ./update.sh ];
|
||||
};
|
||||
|
||||
meta = {
|
||||
@ -251,6 +253,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
sourceProvenance = with lib.sourceTypes; [
|
||||
fromSource
|
||||
|
||||
# @signalapp/sqlcipher
|
||||
# ringrtc
|
||||
binaryNativeCode
|
||||
];
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/ACKNOWLEDGMENTS.md b/ACKNOWLEDGMENTS.md
|
||||
index aed1048..e4c1f50 100644
|
||||
index 2c963f1..96edd02 100644
|
||||
--- a/ACKNOWLEDGMENTS.md
|
||||
+++ b/ACKNOWLEDGMENTS.md
|
||||
@@ -745,30 +745,6 @@ Signal Desktop makes use of the following open source projects.
|
||||
@@ -1636,30 +1636,6 @@ Signal Desktop makes use of the following open source projects.
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
@ -46,10 +46,10 @@ index 68dceea..4b35bb1 100644
|
||||
getBadgesPath(userDataPath),
|
||||
getDraftPath(userDataPath),
|
||||
diff --git a/package.json b/package.json
|
||||
index 3a6ac26..40cdb25 100644
|
||||
index 5755fec..86125ba 100644
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -130,7 +130,6 @@
|
||||
@@ -137,7 +137,6 @@
|
||||
"dashdash": "2.0.0",
|
||||
"direction": "1.0.4",
|
||||
"emoji-datasource": "15.1.2",
|
||||
@ -57,11 +57,18 @@ index 3a6ac26..40cdb25 100644
|
||||
"emoji-regex": "10.4.0",
|
||||
"encoding": "0.1.13",
|
||||
"fabric": "4.6.0",
|
||||
@@ -649,4 +648,4 @@
|
||||
"sticker-creator/dist/**"
|
||||
]
|
||||
}
|
||||
-}
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
|
||||
index ba2f205..705e454 100644
|
||||
index f04b2b1..070fa0f 100644
|
||||
--- a/pnpm-lock.yaml
|
||||
+++ b/pnpm-lock.yaml
|
||||
@@ -169,9 +169,6 @@ importers:
|
||||
@@ -184,9 +184,6 @@ importers:
|
||||
emoji-datasource:
|
||||
specifier: 15.1.2
|
||||
version: 15.1.2
|
||||
@ -71,7 +78,7 @@ index ba2f205..705e454 100644
|
||||
emoji-regex:
|
||||
specifier: 10.4.0
|
||||
version: 10.4.0
|
||||
@@ -4790,9 +4787,6 @@ packages:
|
||||
@@ -4817,9 +4814,6 @@ packages:
|
||||
resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
@ -81,7 +88,7 @@ index ba2f205..705e454 100644
|
||||
emoji-datasource@15.1.2:
|
||||
resolution: {integrity: sha512-tXAqGsrDVhgCRpFePtaD9P4Z8Ro2SUQSL/4MIJBG0SxqQJaMslEbin8J53OaFwEBu6e7JxFaIF6s4mw9+8acAQ==}
|
||||
|
||||
@@ -14929,8 +14923,6 @@ snapshots:
|
||||
@@ -14990,8 +14984,6 @@ snapshots:
|
||||
|
||||
emittery@0.13.1: {}
|
||||
|
||||
@ -90,14 +97,42 @@ index ba2f205..705e454 100644
|
||||
emoji-datasource@15.1.2: {}
|
||||
|
||||
emoji-regex@10.4.0: {}
|
||||
diff --git a/ts/components/conversation/Emojify.tsx b/ts/components/conversation/Emojify.tsx
|
||||
index f0b1115..7613230 100644
|
||||
--- a/ts/components/conversation/Emojify.tsx
|
||||
+++ b/ts/components/conversation/Emojify.tsx
|
||||
@@ -35,8 +35,15 @@ function getImageTag({
|
||||
}
|
||||
diff --git a/stylesheets/components/fun/FunEmoji.scss b/stylesheets/components/fun/FunEmoji.scss
|
||||
index 78c7563..83d196c 100644
|
||||
--- a/stylesheets/components/fun/FunEmoji.scss
|
||||
+++ b/stylesheets/components/fun/FunEmoji.scss
|
||||
@@ -5,19 +5,9 @@
|
||||
$emoji-sprite-sheet-grid-item-count: 62;
|
||||
|
||||
let srcSet: string | undefined;
|
||||
@mixin emoji-sprite($sheet, $margin, $scale) {
|
||||
- $size: calc($sheet * 1px * $scale);
|
||||
- $margin-start: calc($margin * $scale);
|
||||
- $margin-end: calc($margin * $scale);
|
||||
- $size-outer: calc($size + $margin-start + $margin-end);
|
||||
- $image: url('../images/emoji-sheet-#{$sheet}.webp');
|
||||
- background-image: $image;
|
||||
- background-size: calc($size-outer * $emoji-sprite-sheet-grid-item-count);
|
||||
- background-position-x: calc(
|
||||
- var(--fun-emoji-sheet-x) * ($size-outer * -1) + ($margin-start * -1)
|
||||
- );
|
||||
- background-position-y: calc(
|
||||
- var(--fun-emoji-sheet-y) * ($size-outer * -1) + ($margin-start * -1)
|
||||
- );
|
||||
+ background-image: var(--fun-emoji-jumbo-image);
|
||||
+ background-size: contain;
|
||||
+ background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
diff --git a/ts/components/fun/FunEmoji.tsx b/ts/components/fun/FunEmoji.tsx
|
||||
index 08785e8..d25b868 100644
|
||||
--- a/ts/components/fun/FunEmoji.tsx
|
||||
+++ b/ts/components/fun/FunEmoji.tsx
|
||||
@@ -10,7 +10,14 @@ export const FUN_STATIC_EMOJI_CLASS = 'FunStaticEmoji';
|
||||
export const FUN_INLINE_EMOJI_CLASS = 'FunInlineEmoji';
|
||||
|
||||
function getEmojiJumboUrl(emoji: EmojiVariantData): string {
|
||||
- return `emoji://jumbo?emoji=${encodeURIComponent(emoji.value)}`;
|
||||
+ const emojiToNotoName = (emoji: string): string =>
|
||||
+ `emoji_u${
|
||||
+ [...emoji]
|
||||
@ -105,25 +140,7 @@ index f0b1115..7613230 100644
|
||||
+ .map(c => c.codePointAt(0)?.toString(16).padStart(4, "0"))
|
||||
+ .join("_")
|
||||
+ }.png`;
|
||||
if (sizeClass != null && JUMBO_SIZES.has(sizeClass)) {
|
||||
- srcSet = `emoji://jumbo?emoji=${encodeURIComponent(match)} 2x, ${img}`;
|
||||
+ srcSet = `file://@noto-emoji-pngs@/${emojiToNotoName(match)} 2x, ${img}`;
|
||||
}
|
||||
+ return `file://@noto-emoji-pngs@/${emojiToNotoName(emoji.value)}`;
|
||||
}
|
||||
|
||||
return (
|
||||
diff --git a/ts/components/emoji/lib.ts b/ts/components/emoji/lib.ts
|
||||
index 9753017..cf51d3d 100644
|
||||
--- a/ts/components/emoji/lib.ts
|
||||
+++ b/ts/components/emoji/lib.ts
|
||||
@@ -102,7 +102,10 @@ const ROOT_PATH = get(
|
||||
);
|
||||
|
||||
const makeImagePath = (src: string) => {
|
||||
- return `${ROOT_PATH}node_modules/emoji-datasource-apple/img/apple/64/${src}`;
|
||||
+ const datasourceToNoto = (name: string): string =>
|
||||
+ `emoji_u${name.slice(0,-4).split("-").filter(c => c != "fe0f").join("_")}.png`;
|
||||
+
|
||||
+ return `@noto-emoji-pngs@/${datasourceToNoto(src)}`;
|
||||
};
|
||||
|
||||
const imageQueue = new PQueue({
|
||||
export type FunStaticEmojiSize =
|
||||
|
27
pkgs/by-name/si/signal-desktop-source/ringrtc-bin.nix
Normal file
27
pkgs/by-name/si/signal-desktop-source/ringrtc-bin.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchzip,
|
||||
autoPatchelfHook,
|
||||
libpulseaudio,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ringrtc-bin";
|
||||
version = "2.50.3";
|
||||
src = fetchzip {
|
||||
url = "https://build-artifacts.signal.org/libraries/ringrtc-desktop-build-v${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-UJqH/UiT9j36r6fr673CP/Z4lGaSPXIzAkf72YZfExo=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
cp -r . $out
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook ];
|
||||
buildInputs = [ libpulseaudio ];
|
||||
meta = {
|
||||
homepage = "https://github.com/signalapp/ringrtc";
|
||||
license = lib.licenses.agpl3Only;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
};
|
||||
})
|
@ -1,105 +0,0 @@
|
||||
{
|
||||
rustPlatform,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
sqlcipher,
|
||||
fetchpatch,
|
||||
stdenv,
|
||||
openssl,
|
||||
tcl,
|
||||
buildEnv,
|
||||
rust-cbindgen,
|
||||
}:
|
||||
let
|
||||
signal-sqlcipher-extension = rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "signal-sqlcipher-extension";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "signalapp";
|
||||
repo = "Signal-Sqlcipher-Extension";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-INSkm7ZuetPASuIqezzzG/bXoEHClUb9XpxWbxLVXRc=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-qT4HM/FRL8qugKKNlMYM/0zgUsC6cDOa9fgd1d4VIrc=";
|
||||
|
||||
meta = {
|
||||
description = "SQLite extension used by Signal Desktop";
|
||||
homepage = "https://github.com/signalapp/Signal-Sqlcipher-Extension";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = with lib.maintainers; [ marcin-serwin ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
});
|
||||
|
||||
sqlcipher-amalgamation = stdenv.mkDerivation {
|
||||
pname = "sqlcipher-with-signal-extension";
|
||||
|
||||
inherit (sqlcipher) version src meta;
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/sqlcipher/sqlcipher/pull/529
|
||||
name = "custom-crypto-provider.patch";
|
||||
url = "https://github.com/sqlcipher/sqlcipher/commit/0e3b20c155df8a2943b62a9f3cc0f4d3dba9e152.patch";
|
||||
hash = "sha256-OKh6qCGHBQWZyzXfyEveAs71wrNwlWLuG9jNqDeKNG4=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ tcl ];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
CFLAGS = [ "-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1" ];
|
||||
|
||||
makeFlags = [ "sqlite3.c" ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm644 sqlite3.c $out/src/sqlite3.c
|
||||
install -Dm644 sqlite3.h $out/include/sqlite3.h
|
||||
install -Dm644 sqlite3ext.h $out/include/sqlite3ext.h
|
||||
'';
|
||||
};
|
||||
|
||||
signal-tokenizer-headers = rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "Signal-FTS5-Extension";
|
||||
version = "0.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "signalapp";
|
||||
repo = "Signal-FTS5-Extension";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-MzgdRuRsfL3yhlVU0RAAUtAaOukMpqSSa42nRYhpmh0=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-0DDX3ciXk5/3MqsHzxV8s4qEhqYmrwGg7cSbrkFRZbw=";
|
||||
|
||||
nativeBuildInputs = [ rust-cbindgen ];
|
||||
|
||||
buildPhase = ''
|
||||
cbindgen --profile release . -o signal-tokenizer.h
|
||||
'';
|
||||
installPhase = ''
|
||||
install -Dm644 signal-tokenizer.h $out/include/signal-tokenizer.h
|
||||
'';
|
||||
doCheck = false;
|
||||
});
|
||||
|
||||
in
|
||||
buildEnv {
|
||||
name = "sqlcipher-signal";
|
||||
|
||||
paths = [
|
||||
sqlcipher-amalgamation
|
||||
signal-tokenizer-headers
|
||||
signal-sqlcipher-extension
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
install -Dm644 ${./sqlite3.gyp} $out/share/sqlite3.gyp
|
||||
substituteInPlace $out/share/sqlite3.gyp \
|
||||
--replace-fail "@extension@" "$out" \
|
||||
--replace-fail "@static_lib_ext@" "${stdenv.hostPlatform.extensions.staticLibrary}"
|
||||
'';
|
||||
}
|
47
pkgs/by-name/si/signal-desktop-source/update.sh
Executable file
47
pkgs/by-name/si/signal-desktop-source/update.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p bash nix-update common-updater-scripts curl coreutils jq
|
||||
|
||||
set -ex
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
||||
|
||||
curl_github() {
|
||||
curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
|
||||
}
|
||||
|
||||
releaseInfo="`curl_github \
|
||||
"https://api.github.com/repos/signalapp/Signal-Desktop/releases/latest"`"
|
||||
|
||||
releaseTag="`jq -r ".tag_name" <<< $releaseInfo`"
|
||||
releaseDate="`jq -r ".created_at" <<< $releaseInfo`"
|
||||
releaseEpoch=`date -d $releaseDate +%s`
|
||||
|
||||
packageJson="`curl_github "https://raw.githubusercontent.com/signalapp/Signal-Desktop/refs/tags/$releaseTag/package.json"`"
|
||||
|
||||
latestVersion="`jq -r '.version' <<< $packageJson`"
|
||||
nodeVersion="`jq -r '.engines.node' <<< $packageJson | head -c2`"
|
||||
electronVersion="`jq -r '.devDependencies.electron' <<< $packageJson | head -c2`"
|
||||
libsignalClientVersion=`jq -r '.dependencies."@signalapp/libsignal-client"' <<< $packageJson`
|
||||
ringrtcVersion=`jq -r '.dependencies."@signalapp/ringrtc"' <<< $packageJson`
|
||||
|
||||
sed -E -i "s/(nodejs_)../\1$nodeVersion/" $SCRIPT_DIR/package.nix
|
||||
sed -E -i "s/(electron_)../\1$electronVersion/" $SCRIPT_DIR/package.nix
|
||||
sed -E -i "s/(SOURCE_DATE_EPOCH = )[0-9]+/\1$releaseEpoch/" $SCRIPT_DIR/package.nix
|
||||
|
||||
sed -E -i "s/(withAppleEmojis \? )false/\1true/" $SCRIPT_DIR/package.nix
|
||||
nix-update signal-desktop-source --subpackage sticker-creator --version="$latestVersion"
|
||||
sed -E -i "s/(withAppleEmojis \? )true/\1false/" $SCRIPT_DIR/package.nix
|
||||
update-source-version signal-desktop-source \
|
||||
--ignore-same-version \
|
||||
--source-key=pnpmDeps
|
||||
|
||||
update-source-version signal-desktop-source.libsignal-node \
|
||||
"$libsignalClientVersion"
|
||||
update-source-version signal-desktop-source.libsignal-node \
|
||||
--ignore-same-version \
|
||||
--source-key=cargoDeps.vendorStaging
|
||||
update-source-version signal-desktop-source.libsignal-node \
|
||||
--ignore-same-version \
|
||||
--source-key=npmDeps
|
||||
|
||||
update-source-version signal-desktop-source.ringrtc-bin "$ringrtcVersion"
|
Loading…
Reference in New Issue
Block a user