Merge pull request #72 from privatevoid-net/pr-flake-update
`flake.lock`: Update
This commit is contained in:
commit
d1b328996c
8 changed files with 57 additions and 137 deletions
60
flake.lock
60
flake.lock
|
@ -306,11 +306,11 @@
|
|||
"pre-commit-hooks-nix": "pre-commit-hooks-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680449544,
|
||||
"narHash": "sha256-Vvf7JlX/wZFJNhCaB9QqmqQbhgmuZ2QRoMXgpPy/0B4=",
|
||||
"lastModified": 1680964619,
|
||||
"narHash": "sha256-RMFgr7qWyw/dxGC8JKhlpnywpu2zzJL9qg4F2qV91HQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-agent",
|
||||
"rev": "7f046e522aa3f37e3e9d0558869c056d4dff1ed6",
|
||||
"rev": "af59f3fe94fae65532e118e60c1b48f1a2a54a9a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -416,11 +416,11 @@
|
|||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1678109515,
|
||||
"narHash": "sha256-C2X+qC80K2C1TOYZT8nabgo05Dw2HST/pSn6s+n6BO8=",
|
||||
"lastModified": 1681154353,
|
||||
"narHash": "sha256-MCJ5FHOlbfQRFwN0brqPbCunLEVw05D/3sRVoNVt2tI=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "aa9ff6ce4a7f19af6415fb3721eaa513ea6c763c",
|
||||
"rev": "f529f42792ade8e32c4be274af6b6d60857fbee7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -457,11 +457,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1678293141,
|
||||
"narHash": "sha256-lLlQHaR0y+q6nd6kfpydPTGHhl1rS9nU9OQmztzKOYs=",
|
||||
"lastModified": 1680213900,
|
||||
"narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c90c4025bb6e0c4eaf438128a3b2640314b1c58d",
|
||||
"rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -473,11 +473,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1673800717,
|
||||
"narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=",
|
||||
"lastModified": 1678872516,
|
||||
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f",
|
||||
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -489,11 +489,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1680724564,
|
||||
"narHash": "sha256-eeUUGOTKTelYKDbUxKs0V7GUa186L2fym7jM2QQ4Oss=",
|
||||
"lastModified": 1681349002,
|
||||
"narHash": "sha256-9Ckc2WvSwuYrPfk3ZXgPasM1ir/cgs6UV0EpIWyPGZE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "36adaa6aaa6b03e59102df0c1b12cdc3f23fd112",
|
||||
"rev": "2b1bba76a13ed39c7abc0a6e8f74f9e168cf3c7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -532,11 +532,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1678376203,
|
||||
"narHash": "sha256-3tyYGyC8h7fBwncLZy5nCUjTJPrHbmNwp47LlNLOHSM=",
|
||||
"lastModified": 1680170909,
|
||||
"narHash": "sha256-FtKU/edv1jFRr/KwUxWTYWXEyj9g8GBrHntC2o8oFI8=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "1a20b9708962096ec2481eeb2ddca29ed747770a",
|
||||
"rev": "29dbe1efaa91c3a415d8b45d62d48325a4748816",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -546,12 +546,15 @@
|
|||
}
|
||||
},
|
||||
"repin-flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680776469,
|
||||
"narHash": "sha256-3CXUDK/3q/kieWtdsYpDOBJw3Gw4Af6x+2EiSnIkNQw=",
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "411e8764155aa9354dbcd6d5faaeb97e9e3dce24",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -578,6 +581,21 @@
|
|||
"nixpkgs": "nixpkgs_2",
|
||||
"repin-flake-utils": "repin-flake-utils"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -59,7 +59,8 @@ in
|
|||
|
||||
environment = {
|
||||
NODE_ENV = "production";
|
||||
DATA_DIR = dataDir;
|
||||
# immense stupidity: uptime-kuma expects this path to end in a slash
|
||||
DATA_DIR = "${dataDir}/";
|
||||
UPTIME_KUMA_HOST = link.ipv4;
|
||||
UPTIME_KUMA_PORT = link.portStr;
|
||||
UPTIME_KUMA_HIDE_LOG = lib.concatStringsSep "," [
|
||||
|
|
|
@ -52,7 +52,6 @@ in
|
|||
uptime-kuma.runtime-bugfixes = {
|
||||
patches = [
|
||||
./uptime-kuma/chmod-database.patch
|
||||
./uptime-kuma/data-dir-concat-with-slash.patch
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
diff --git a/server/database.js b/server/database.js
|
||||
index 575827f3..8e288095 100644
|
||||
--- a/server/database.js
|
||||
+++ b/server/database.js
|
||||
@@ -87,20 +87,20 @@ class Database {
|
||||
*/
|
||||
static init(args) {
|
||||
// Data Directory (must be end with "/")
|
||||
- Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data/";
|
||||
+ Database.dataDir = process.env.DATA_DIR || args["data-dir"] || "./data";
|
||||
|
||||
// Plugin feature is working only if the dataDir = "./data";
|
||||
- if (Database.dataDir !== "./data/") {
|
||||
+ if (Database.dataDir !== "./data") {
|
||||
log.warn("PLUGIN", "Warning: In order to enable plugin feature, you need to use the default data directory: ./data/");
|
||||
PluginsManager.disable = true;
|
||||
}
|
||||
|
||||
- Database.path = Database.dataDir + "kuma.db";
|
||||
+ Database.path = Database.dataDir + "/kuma.db";
|
||||
if (! fs.existsSync(Database.dataDir)) {
|
||||
fs.mkdirSync(Database.dataDir, { recursive: true });
|
||||
}
|
||||
|
||||
- Database.uploadDir = Database.dataDir + "upload/";
|
||||
+ Database.uploadDir = Database.dataDir + "/upload/";
|
||||
|
||||
if (! fs.existsSync(Database.uploadDir)) {
|
||||
fs.mkdirSync(Database.uploadDir, { recursive: true });
|
||||
@@ -455,7 +455,7 @@ class Database {
|
||||
static backup(version) {
|
||||
if (! this.backupPath) {
|
||||
log.info("db", "Backing up the database");
|
||||
- this.backupPath = this.dataDir + "kuma.db.bak" + version;
|
||||
+ this.backupPath = this.dataDir + "/kuma.db.bak" + version;
|
||||
fs.copyFileSync(Database.path, this.backupPath);
|
||||
|
||||
const shmPath = Database.path + "-shm";
|
|
@ -9,10 +9,10 @@
|
|||
},
|
||||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"version": "v2.2.4",
|
||||
"revision": "a6fb44e1abe9ad48136dee8e7d053e639f37bedc",
|
||||
"url": "https://api.github.com/repos/cinnyapp/cinny/tarball/v2.2.4",
|
||||
"hash": "0m7y1hzsdmlhp39hdv2fazhm07kskgb5qf2khhyxrs8nlas4fbha"
|
||||
"version": "v2.2.6",
|
||||
"revision": "f6694031a1581af171ffe1658138dfcf344d6c6c",
|
||||
"url": "https://api.github.com/repos/cinnyapp/cinny/tarball/v2.2.6",
|
||||
"hash": "0zq26wpdh96clabw3nzmbv2fl6kiky39m6n843jap239mxpf1bqd"
|
||||
},
|
||||
"excalidraw": {
|
||||
"type": "Git",
|
||||
|
@ -22,9 +22,9 @@
|
|||
"repo": "excalidraw"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "ac4c8b3ca798c486a3c86ad71eb4d16352a486be",
|
||||
"url": "https://github.com/excalidraw/excalidraw/archive/ac4c8b3ca798c486a3c86ad71eb4d16352a486be.tar.gz",
|
||||
"hash": "03gyrg9ykm6cw2bhw1a8f30yhazr4bsfahmi03fpbcb80v3q2vvz"
|
||||
"revision": "ca3be2c678dfc5fae50d005fdcfe3b8c84fc2544",
|
||||
"url": "https://github.com/excalidraw/excalidraw/archive/ca3be2c678dfc5fae50d005fdcfe3b8c84fc2544.tar.gz",
|
||||
"hash": "1p9d63x1n9dqkz8f3rcwkm20yjrgb9ycq22z9458lwi2qx1rbngl"
|
||||
},
|
||||
"searxng": {
|
||||
"type": "Git",
|
||||
|
@ -34,9 +34,9 @@
|
|||
"repo": "searxng"
|
||||
},
|
||||
"branch": "master",
|
||||
"revision": "9dc36965bbb118db64c0bf2d3f54389d4d484670",
|
||||
"url": "https://github.com/searxng/searxng/archive/9dc36965bbb118db64c0bf2d3f54389d4d484670.tar.gz",
|
||||
"hash": "0h5dvnrp3v88mgv9snccsrqsvy20mi3sga7s408fmid2n248ws8k"
|
||||
"revision": "b07e44e55270b390b503003600d72b785adab1b9",
|
||||
"url": "https://github.com/searxng/searxng/archive/b07e44e55270b390b503003600d72b785adab1b9.tar.gz",
|
||||
"hash": "13vv4pq76i5a56ivcnm62lca4w5hsg2yfzkr88c8g6bsdhzw6s4w"
|
||||
},
|
||||
"stevenblack-hosts": {
|
||||
"type": "GitRelease",
|
||||
|
@ -47,10 +47,10 @@
|
|||
},
|
||||
"pre_releases": false,
|
||||
"version_upper_bound": null,
|
||||
"version": "3.12.15",
|
||||
"revision": "0cfed81116bf22d3719fffe5b08b72eab115b3e1",
|
||||
"url": "https://api.github.com/repos/StevenBlack/hosts/tarball/3.12.15",
|
||||
"hash": "10b0y5wpbylpl4snczfg0dw9cr6dkb5iryqzx3vqm822p7kmg0qy"
|
||||
"version": "3.12.19",
|
||||
"revision": "e8f0271c8c69a7e60d034f84c1195e628972ea3e",
|
||||
"url": "https://api.github.com/repos/StevenBlack/hosts/tarball/3.12.19",
|
||||
"hash": "1yqjc3qpckxi9qgjd180p3hgavq3hgi4r2mzgj7ws8n5js6qxjwx"
|
||||
},
|
||||
"tempo": {
|
||||
"type": "GitRelease",
|
||||
|
|
|
@ -11,7 +11,7 @@ let
|
|||
src = fetchzip {
|
||||
name = "cinny-tarball-${version}";
|
||||
url = "https://github.com/${repo.owner}/${repo.repo}/releases/download/${cinny.version}/cinny-${cinny.version}.tar.gz";
|
||||
sha256 = "sha256-zMvCpjt74U8Fsuw8husaXtcccD5eF4wknOw0YWT9b/M=";
|
||||
sha256 = "sha256-5g8Xva0lIE2Ng/guPlcrEsddfliltBJqouPEIUMdIKE=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
diff --git a/requirements.txt b/requirements.txt
|
||||
index 2de33f4baa..947a88433f 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
certifi==2022.12.7
|
||||
babel==2.11.0
|
||||
-flask-babel==2.0.0
|
||||
+flask-babel==3.0.0
|
||||
flask==2.2.2
|
||||
jinja2==3.1.2
|
||||
lxml==4.9.2
|
||||
diff --git a/searx/locales.py b/searx/locales.py
|
||||
index 8547e7fa7b..9e06bf39d4 100644
|
||||
--- a/searx/locales.py
|
||||
+++ b/searx/locales.py
|
||||
@@ -86,7 +86,7 @@ def get_translations():
|
||||
use_translation = flask.request.form.get('use-translation')
|
||||
if use_translation in ADDITIONAL_TRANSLATIONS:
|
||||
babel_ext = flask_babel.current_app.extensions['babel']
|
||||
- return Translations.load(next(babel_ext.translation_directories), use_translation)
|
||||
+ return Translations.load(babel_ext.translation_directories[0], use_translation)
|
||||
return _flask_babel_get_translations()
|
||||
|
||||
|
||||
diff --git a/searx/webapp.py b/searx/webapp.py
|
||||
index d4206ca16b..d9ca3941cd 100755
|
||||
--- a/searx/webapp.py
|
||||
+++ b/searx/webapp.py
|
||||
@@ -160,8 +160,6 @@
|
||||
app.jinja_env.filters['group_engines_in_tab'] = group_engines_in_tab # pylint: disable=no-member
|
||||
app.secret_key = settings['server']['secret_key']
|
||||
|
||||
-babel = Babel(app)
|
||||
-
|
||||
timeout_text = gettext('timeout')
|
||||
parsing_error_text = gettext('parsing error')
|
||||
http_protocol_error_text = gettext('HTTP protocol error')
|
||||
@@ -211,13 +209,15 @@ class ExtendedRequest(flask.Request):
|
||||
request = typing.cast(ExtendedRequest, flask.request)
|
||||
|
||||
|
||||
-@babel.localeselector
|
||||
def get_locale():
|
||||
locale = localeselector()
|
||||
logger.debug("%s uses locale `%s`", urllib.parse.quote(request.url), locale)
|
||||
return locale
|
||||
|
||||
|
||||
+babel = Babel(app, locale_selector=get_locale)
|
||||
+
|
||||
+
|
||||
def _get_browser_language(req, lang_list):
|
||||
for lang in req.headers.get("Accept-Language", "en").split(","):
|
||||
if ';' in lang:
|
|
@ -1,13 +1,8 @@
|
|||
--- b/requirements.txt
|
||||
+++ a/requirements.txt
|
||||
@@ -1,6 +1,6 @@
|
||||
certifi==2022.12.7
|
||||
babel==2.11.0
|
||||
@@ -3,1 +3,1 @@
|
||||
+flask-babel==2.0.0
|
||||
-flask-babel==3.0.1
|
||||
flask==2.2.3
|
||||
jinja2==3.1.2
|
||||
lxml==4.9.2
|
||||
--- b/searx/locales.py
|
||||
+++ a/searx/locales.py
|
||||
@@ -86,7 +86,7 @@
|
||||
|
|
Loading…
Reference in a new issue