Merge branch 'master' into staging-next

Conflicts:
	pkgs/development/python-modules/mautrix/default.nix
This commit is contained in:
Dmitry Kalinkin 2021-12-29 16:27:23 -05:00
commit e10d27e503
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
15 changed files with 1335 additions and 1434 deletions

View File

@ -253,6 +253,13 @@
configuration.
</para>
</listitem>
<listitem>
<para>
The option <literal>services.duplicati.dataDir</literal> has
been added to allow changing the location of duplicatis
files.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View File

@ -101,3 +101,5 @@ In addition to numerous new and upgraded packages, this release has the followin
e.g. Wayland.
- The `services.stubby` module was converted to a [settings-style](https://github.com/NixOS/rfcs/blob/master/rfcs/0042-config-option.md) configuration.
- The option `services.duplicati.dataDir` has been added to allow changing the location of duplicati's files.

View File

@ -18,6 +18,20 @@ in
'';
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/duplicati";
description = ''
The directory where Duplicati stores its data files.
<note><para>
If left as the default value this directory will automatically be created
before the Duplicati server starts, otherwise you are responsible for ensuring
the directory exists with appropriate ownership and permissions.
</para></note>
'';
};
interface = mkOption {
default = "127.0.0.1";
type = types.str;
@ -45,20 +59,23 @@ in
description = "Duplicati backup";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = cfg.user;
Group = "duplicati";
StateDirectory = "duplicati";
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati";
Restart = "on-failure";
};
serviceConfig = mkMerge [
{
User = cfg.user;
Group = "duplicati";
ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir}";
Restart = "on-failure";
}
(mkIf (cfg.dataDir == "/var/lib/duplicati") {
StateDirectory = "duplicati";
})
];
};
users.users = lib.optionalAttrs (cfg.user == "duplicati") {
duplicati = {
uid = config.ids.uids.duplicati;
home = "/var/lib/duplicati";
createHome = true;
home = cfg.dataDir;
group = "duplicati";
};
};

View File

@ -145,7 +145,7 @@ in {
--config='${settingsFile}' \
--registration='${registrationFile}'
fi
'' + lib.optionalString (pkgs.mautrix-telegram ? alembic) ''
# run automatic database init and migration scripts
${pkgs.mautrix-telegram.alembic}/bin/alembic -x config='${settingsFile}' upgrade head
'';

View File

@ -19,8 +19,11 @@ python3Packages.buildPythonApplication rec {
propagatedBuildInputs = [ gtk3 gdk-pixbuf gobject-introspection ]
++ (with python3Packages; [ pygobject3 ]);
postInstall = ''
mv $out/bin/nicotine $out/bin/nicotine-plus
ln -s $out/bin/nicotine $out/bin/nicotine-plus
test -e $out/share/applications/org.nicotine_plus.Nicotine.desktop && exit 1
install -D data/org.nicotine_plus.Nicotine.desktop -t $out/share/applications
'';
preFixup = ''

View File

@ -4,11 +4,11 @@
buildPythonPackage rec {
pname = "mautrix";
version = "0.12.5";
version = "0.14.0";
src = fetchPypi {
inherit pname version;
sha256 = "f7095cc4e5aa85043416fbfc5ca3e03c46800dcebfe3ac1d502e520197cea1ee";
sha256 = "5ad04e87bcf31eb3479fdd3cabd5082b257013e5c00f6b369539a2b584afadaf";
};
propagatedBuildInputs = [

View File

@ -1,6 +1,21 @@
{ lib, fetchFromGitHub, fetchpatch, python3Packages }:
{ lib, fetchFromGitHub, fetchpatch, python3 }:
python3Packages.buildPythonApplication rec {
let
python = python3.override {
packageOverrides = self: super: {
mautrix_0_13 = self.mautrix.overridePythonAttrs (oldAttrs: rec {
version = "0.13.3";
src = oldAttrs.src.override {
inherit (oldAttrs) pname;
inherit version;
sha256 = "1e4a292469f3e200c182aaa5bf693a5c3834b2a0cfb3d29e4c9a1559db7740e3";
};
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "heisenbridge";
version = "1.8.2";
@ -15,15 +30,15 @@ python3Packages.buildPythonApplication rec {
echo "${version}" > heisenbridge/version.txt
'';
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = with python.pkgs; [
aiohttp
irc
mautrix
mautrix_0_13
python-socks
pyyaml
];
checkInputs = with python3Packages; [
checkInputs = with python.pkgs; [
pytestCheckHook
];

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "matterbridge";
version = "1.22.3";
version = "1.23.2";
src = fetchFromGitHub {
owner = "42wim";
repo = pname;
rev = "v${version}";
sha256 = "sha256-YBIDNyjS8Si7A2Bciz5M8jY3JrgKOmlDPT0m5QM/9+Y=";
sha256 = "03fxq8dxkd5qiiw4zfsacdk2skg3apb4aw7k3wq0fv4n65hk25y3";
};
vendorSha256 = null;

View File

@ -8,22 +8,20 @@ Subject: [PATCH 1/2] Re-add entrypoint
1 file changed, 6 insertions(+)
diff --git a/setup.py b/setup.py
index 068c351..95dbf89 100644
index ea001e5..e1ca536 100644
--- a/setup.py
+++ b/setup.py
@@ -51,6 +51,12 @@ setuptools.setup(
@@ -54,6 +54,12 @@ setuptools.setup(
extras_require=extras_require,
python_requires="~=3.6",
python_requires="~=3.7",
+ entry_points={
+ 'console_scripts': [
+ 'mautrix-telegram=mautrix_telegram.__main__:main'
+ ]
+ },
+
setup_requires=["pytest-runner"],
tests_require=["pytest", "pytest-asyncio", "pytest-mock"],
--
2.28.0
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",

View File

@ -5,20 +5,12 @@
let
python = python3.override {
packageOverrides = self: super: {
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.3.24";
src = oldAttrs.src.override {
inherit version;
sha256 = "ebbb777cbf9312359b897bf81ba00dae0f5cb69fba2a18265dcc18a6f5ef7519";
};
});
tulir-telethon = self.telethon.overridePythonAttrs (oldAttrs: rec {
version = "1.24.0a2";
version = "1.25.0a1";
pname = "tulir-telethon";
src = oldAttrs.src.override {
inherit pname version;
sha256 = "sha256-Qbx164FwC8nhesoY2fkaKvErN8g0Ph8vGcx+Cc1AqRg=";
sha256 = "sha256-TFZRmhCrQ9IccGFcYxwdbD2ReSCWZ2n33S1ank1Bn1k=";
};
});
};
@ -33,17 +25,17 @@ let
in python.pkgs.buildPythonPackage rec {
pname = "mautrix-telegram";
version = "0.10.2";
version = "0.11.0";
disabled = python.pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mautrix";
repo = "telegram";
rev = "v${version}";
sha256 = "sha256-BYsGLyxhdjBVmnZXLC5ZjwDlWcHdUGp+DsNIOXA1/Tc=";
sha256 = "sha256-s0UCl0FJWO53hvHJhpeSQVGCBKEH7COFLXFCFitpDjw=";
};
patches = [ ./0001-Re-add-entrypoint.patch ./0002-Don-t-depend-on-pytest-runner.patch ];
patches = [ ./0001-Re-add-entrypoint.patch ];
postPatch = ''
sed -i -e '/alembic>/d' requirements.txt
substituteInPlace requirements.txt \

View File

@ -7,7 +7,7 @@
, nodejs
, mkYarnPackage
, fetchYarnDeps
, python2
, python3
, nixosTests
, buildGoModule
}:
@ -43,7 +43,7 @@ mkYarnPackage rec {
};
nativeBuildInputs = [ which makeWrapper ];
extraBuildInputs = [ python2 esbuild-hedgedoc ];
extraBuildInputs = [ python3 esbuild-hedgedoc ];
offlineCache = fetchYarnDeps {
inherit yarnLock;

View File

@ -1,6 +1,6 @@
{
"name": "HedgeDoc",
"version": "1.9.2",
"version": "1.9.0",
"description": "The best platform to write and share markdown.",
"main": "app.js",
"license": "AGPL-3.0",
@ -37,8 +37,8 @@
"ejs": "^3.0.0",
"express": ">=4.14",
"express-session": "^1.14.2",
"formidable": "^2.0.0",
"file-type": "^17.0.0",
"file-type": "^16.1.0",
"formidable": "^1.0.17",
"graceful-fs": "^4.1.11",
"helmet": "^4.5.0",
"i18n": "^0.13.0",
@ -70,7 +70,7 @@
"morgan": "^1.7.0",
"mysql2": "^2.0.0",
"node-fetch": "^2.6.1",
"passport": "^0.5.0",
"passport": "^0.4.0",
"passport-dropbox-oauth2": "^1.1.0",
"passport-facebook": "^3.0.0",
"passport-github": "^1.1.0",
@ -85,7 +85,7 @@
"pdfobject": "^2.0.201604172",
"pg": "^8.2.1",
"pg-hstore": "^2.3.3",
"prom-client": "^14.0.0",
"prom-client": "^13.1.0",
"prometheus-api-metrics": "^3.2.0",
"randomcolor": "^0.6.0",
"readline-sync": "^1.4.7",
@ -110,7 +110,7 @@
"**/request": "^2.88.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || 16.x"
"node": ">=12"
},
"bugs": "https://github.com/hedgedoc/hedgedoc/issues",
"keywords": [
@ -153,19 +153,19 @@
"copy-webpack-plugin": "6.4.1",
"css-loader": "5.2.7",
"emojify.js": "1.1.0",
"esbuild-loader": "2.16.0",
"esbuild-loader": "2.15.1",
"escape-html": "1.0.3",
"eslint": "8.3.0",
"eslint": "7.32.0",
"eslint-config-standard": "16.0.3",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-import": "2.24.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.1.1",
"eslint-plugin-promise": "5.1.0",
"eslint-plugin-standard": "4.1.0",
"exports-loader": "1.1.1",
"expose-loader": "1.0.3",
"file-loader": "6.2.0",
"file-saver": "2.0.5",
"flowchart.js": "1.17.0",
"flowchart.js": "1.15.0",
"fork-awesome": "1.2.0",
"gist-embed": "2.6.0",
"highlight.js": "10.7.3",
@ -174,25 +174,25 @@
"ionicons": "2.0.1",
"jquery": "3.6.0",
"jquery-mousewheel": "3.1.13",
"jquery-ui": "1.13.0",
"jquery-ui": "1.12.1",
"js-cookie": "3.0.1",
"js-sequence-diagrams": "git+https://github.com/hedgedoc/js-sequence-diagrams.git",
"js-yaml": "3.14.1",
"jsonlint": "1.6.3",
"keymaster": "1.6.2",
"less": "4.1.2",
"less": "4.1.1",
"less-loader": "7.3.0",
"list.js": "2.3.1",
"mathjax": "2.7.9",
"mermaid": "8.13.4",
"mermaid": "8.12.1",
"mini-css-extract-plugin": "1.6.2",
"mocha": "9.1.3",
"mocha": "9.1.1",
"mock-require": "3.0.3",
"optimize-css-assets-webpack-plugin": "6.0.1",
"prismjs": "1.25.0",
"prismjs": "1.24.1",
"raphael": "2.3.0",
"remark-cli": "10.0.1",
"remark-preset-lint-markdown-style-guide": "5.1.1",
"remark-cli": "10.0.0",
"remark-preset-lint-markdown-style-guide": "5.0.1",
"reveal.js": "3.9.2",
"select2": "3.5.2-browserify",
"socket.io-client": "2.4.0",
@ -204,7 +204,7 @@
"visibilityjs": "2.0.2",
"viz.js": "1.8.2",
"webpack": "4.46.0",
"webpack-cli": "4.9.1",
"webpack-cli": "4.8.0",
"webpack-merge": "5.8.0",
"wurl": "2.5.4"
},

View File

@ -1,5 +1,5 @@
{
"version": "1.9.2",
"srcHash": "e0oPib+JutFBCuCSuokqLL94isI4SfGIT5aLnTjpulM=",
"yarnHash": "0kb91c2jppwp9vg70c5jhy5lhf09p35blci8cvpj69y5sk80q0zc"
"version": "1.9.0",
"srcHash": "hSKQGkI1+68Zf05RhgRKZo47buyobzjhURSZ30/h0PA=",
"yarnHash": "0v51jmmbg8fx66ay2glby0gxw07in95igz325p42g5hjd5kankf6"
}

File diff suppressed because it is too large Load Diff

View File

@ -21136,7 +21136,9 @@ with pkgs;
mattermost = callPackage ../servers/mattermost { };
matterircd = callPackage ../servers/mattermost/matterircd.nix { };
matterbridge = callPackage ../servers/matterbridge { };
matterbridge = callPackage ../servers/matterbridge {
buildGoModule = buildGo117Module;
};
mattermost-desktop = callPackage ../applications/networking/instant-messengers/mattermost-desktop { };