signal-desktop-from-src: 7.37.0 -> 7.42.0
This commit is contained in:
@@ -140,18 +140,21 @@ let
|
|||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# sqlcipherTarball = fetchurl {
|
# better-sqlite3 can be built from source, or use the prebuilt version from nixpkgs' signal-desktop.
|
||||||
# # this is a dependency of better-sqlite3.
|
# just do whatever's easiest (and works) at the time of upgrade; set `null` to use the prebuild
|
||||||
# # version/url is found in <repo:signalapp/better-sqlite3:deps/download.js>
|
# sqlcipherTarball = null;
|
||||||
# # - checkout the better-sqlite3 tag which matches signal-dekstop's package.json "@signalapp/better-sqlite3" key.
|
sqlcipherTarball = fetchurl {
|
||||||
# url = let
|
# this is a dependency of better-sqlite3.
|
||||||
# BETTER_SQLITE3_VERSION = "9.0.8"; #< from Signal-Desktop/package.json
|
# version/url is found in <repo:signalapp/better-sqlite3:deps/download.js>
|
||||||
# HASH = "b0dbebe5b2d81879984bfa2318ba364fb4d436669ddc1668d2406eaaaee40b7e";
|
# - checkout the better-sqlite3 tag which matches signal-dekstop's package.json "@signalapp/better-sqlite3" key.
|
||||||
# SQLCIPHER_VERSION = "4.6.1-signal-patch2";
|
url = let
|
||||||
# EXTENSION_VERSION = "0.2.0";
|
BETTER_SQLITE3_VERSION = "9.0.11"; #< from Signal-Desktop/package.json
|
||||||
# in "https://build-artifacts.signal.org/desktop/sqlcipher-v2-${SQLCIPHER_VERSION}--${EXTENSION_VERSION}-${HASH}.tar.gz";
|
HASH = "6253f886c40e49bf892d5cdc92b2eb200b12cd8d80c48ce5b05967cfd01ee8c7";
|
||||||
# hash = "sha256-sNvr5bLYGHmYS/ojGLo2T7TUNmad3BZo0kBuqq7kC34=";
|
SQLCIPHER_VERSION = "4.6.1-signal-patch2";
|
||||||
# };
|
EXTENSION_VERSION = "0.2.1-asm2";
|
||||||
|
in "https://build-artifacts.signal.org/desktop/sqlcipher-v2-${SQLCIPHER_VERSION}--${EXTENSION_VERSION}-${HASH}.tar.gz";
|
||||||
|
hash = "sha256-YlP4hsQOSb+JLVzckrLrIAsSzY2AxIzlsFlnz9Ae6Mc=";
|
||||||
|
};
|
||||||
|
|
||||||
# signal-fts5-extension = callPackage ./fts5-extension { };
|
# signal-fts5-extension = callPackage ./fts5-extension { };
|
||||||
# bettersqlitePatch = substituteAll {
|
# bettersqlitePatch = substituteAll {
|
||||||
@@ -177,17 +180,29 @@ let
|
|||||||
in
|
in
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
pname = "signal-desktop-from-src";
|
pname = "signal-desktop-from-src";
|
||||||
version = "7.37.0";
|
# version = "7.38.0";
|
||||||
|
# version = "7.39.0";
|
||||||
|
# version = "7.40.0";
|
||||||
|
version = "7.42.0";
|
||||||
|
# version = "7.43.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "signalapp";
|
owner = "signalapp";
|
||||||
repo = "Signal-Desktop";
|
repo = "Signal-Desktop";
|
||||||
leaveDotGit = true; # signal calculates the release date via `git`
|
leaveDotGit = true; # signal calculates the release date via `git`
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-Uh2VzPmNTjlE5dsFiAhXR6lxV53IJG7IexZNArGTBhU=";
|
# hash = "sha256-Hw3PcNHmu5Ujw/aCTBNGS1882ozFw21d+68ipNQE62M="; # 7.38.0
|
||||||
|
# hash = "sha256-+Ohk9jZ4QLqqtK+j+NCD0KkCXDL39pjjPZ/y637glO4="; # 7.39.0
|
||||||
|
# hash = "sha256-6dnep2Jt+GUEVfrwl5TMu/MS0bloxiuQUYjNcJ1PJVE="; # 7.40.0
|
||||||
|
hash = "sha256-YBG3GUkGwZfFSf51RTT01gUshe8pFJ3u9kThiZNmtJg="; # 7.42.0
|
||||||
|
# hash = "sha256-t07xXuxHmv5iIlCbkVaS6Z5TFEHTIbbiEYjs8Uyd6ro="; # 7.43.0
|
||||||
};
|
};
|
||||||
|
|
||||||
npmDepsHash = "sha256-U1dWB1E36A+M7XLosxMd2oRifJ6czFxzuz3pOTiJ+oM=";
|
# npmDepsHash = "sha256-S9ipegn30YICgNrPtoykjUGYMhPKkbrg36WMMoi9+AA="; # 7.38.0
|
||||||
|
# npmDepsHash = "sha256-qbMc35P/lJc0Gx3bWYYeBIvLRX+5ZO3i5c55zM6h/P8="; # 7.39.0
|
||||||
|
# npmDepsHash = "sha256-xDjqmJGh7+v1FWOZmszmZtXBpW5InRXHYjftFuX4hA0="; # 7.40.0
|
||||||
|
npmDepsHash = "sha256-AQQliyhKwsLEVn16iRrevJmbFQsNaVnP0XyyadwxlTM="; # 7.42.0
|
||||||
|
# npmDepsHash = "sha256-AhsHdgHsN9jAsiESvVXXD1sJ02CvzjkG0rZiXz0WtN0="; # 7.43.0
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# ./debug.patch
|
# ./debug.patch
|
||||||
@@ -266,7 +281,7 @@ buildNpmPackage rec {
|
|||||||
|
|
||||||
dontWrapGApps = true;
|
dontWrapGApps = true;
|
||||||
# dontStrip = false;
|
# dontStrip = false;
|
||||||
# makeCacheWritable = true;
|
makeCacheWritable = true; # "Your cache folder contains root-owned files, due to a bug in previous versions of npm which has since been addressed."
|
||||||
|
|
||||||
npmRebuildFlags = [
|
npmRebuildFlags = [
|
||||||
# "--offline"
|
# "--offline"
|
||||||
@@ -298,17 +313,19 @@ buildNpmPackage rec {
|
|||||||
# provide necessities which were skipped as part of --ignore-scripts
|
# provide necessities which were skipped as part of --ignore-scripts
|
||||||
rsync -arv ${ringrtcPrebuild}/ node_modules/@signalapp/ringrtc/
|
rsync -arv ${ringrtcPrebuild}/ node_modules/@signalapp/ringrtc/
|
||||||
|
|
||||||
# option 1: replace the entire better-sqlite3 library with the prebuilt version from nixpkgs' signal-desktop
|
${if sqlcipherTarball == null then ''
|
||||||
rsync -arv ${betterSqlitePrebuild}/ node_modules/@signalapp/better-sqlite3/
|
# option 1: replace the entire better-sqlite3 library with the prebuilt version from nixpkgs' signal-desktop
|
||||||
# patch so signal doesn't try to *rebuild* better-sqlite3
|
rsync -arv ${betterSqlitePrebuild}/ node_modules/@signalapp/better-sqlite3/
|
||||||
substituteInPlace node_modules/@signalapp/better-sqlite3/package.json \
|
# patch so signal doesn't try to *rebuild* better-sqlite3
|
||||||
--replace-fail '"download": "node ./deps/download.js"' '"download": "true"' \
|
substituteInPlace node_modules/@signalapp/better-sqlite3/package.json \
|
||||||
--replace-fail '"build-release": "node-gyp rebuild --release"' '"build-release": "true"' \
|
--replace-fail '"download": "node ./deps/download.js"' '"download": "true"' \
|
||||||
--replace-fail '"install": "npm run download && npm run build-release"' '"install": "true"'
|
--replace-fail '"build-release": "node-gyp rebuild --release"' '"build-release": "true"' \
|
||||||
|
--replace-fail '"install": "npm run download && npm run build-release"' '"install": "true"'
|
||||||
# option 2: replace only the sqlcipher plugin with Signal's prebuilt version,
|
'' else ''
|
||||||
# and build the rest of better-sqlite3 from source
|
# option 2: replace only the sqlcipher plugin with Signal's prebuilt version,
|
||||||
# cp $${sqlcipherTarball} node_modules/@signalapp/better-sqlite3/deps/sqlcipher.tar.gz
|
# and build the rest of better-sqlite3 from source
|
||||||
|
cp ${sqlcipherTarball} node_modules/@signalapp/better-sqlite3/deps/sqlcipher.tar.gz
|
||||||
|
''}
|
||||||
|
|
||||||
# pushd node_modules/@signalapp/better-sqlite3
|
# pushd node_modules/@signalapp/better-sqlite3
|
||||||
# # node-gyp isn't consistently linked into better-sqlite's `node_modules` (maybe due to version mismatch with signal-desktop's node-gyp?)
|
# # node-gyp isn't consistently linked into better-sqlite's `node_modules` (maybe due to version mismatch with signal-desktop's node-gyp?)
|
||||||
|
Reference in New Issue
Block a user