mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-06 04:27:27 +03:00
Merge pull request #311916 from wegank/pretalx-plugins-init
pretalx: add a few plugins
This commit is contained in:
commit
10955966a5
@ -11,14 +11,19 @@ let
|
|||||||
|
|
||||||
configFile = format.generate "pretalx.cfg" cfg.settings;
|
configFile = format.generate "pretalx.cfg" cfg.settings;
|
||||||
|
|
||||||
extras = cfg.package.optional-dependencies.redis
|
finalPackage = cfg.package.override {
|
||||||
++ lib.optionals (cfg.settings.database.backend == "mysql") cfg.package.optional-dependencies.mysql
|
inherit (cfg) plugins;
|
||||||
++ lib.optionals (cfg.settings.database.backend == "postgresql") cfg.package.optional-dependencies.postgres;
|
};
|
||||||
|
|
||||||
pythonEnv = cfg.package.python.buildEnv.override {
|
pythonEnv = finalPackage.python.buildEnv.override {
|
||||||
extraLibs = [ (cfg.package.python.pkgs.toPythonModule cfg.package) ]
|
extraLibs = with finalPackage.python.pkgs; [
|
||||||
++ (with cfg.package.python.pkgs; [ gunicorn ]
|
(toPythonModule finalPackage)
|
||||||
++ lib.optional cfg.celery.enable celery) ++ extras;
|
gunicorn
|
||||||
|
]
|
||||||
|
++ finalPackage.optional-dependencies.redis
|
||||||
|
++ lib.optionals cfg.celery.enable [ celery ]
|
||||||
|
++ lib.optionals (cfg.settings.database.backend == "mysql") finalPackage.optional-dependencies.mysql
|
||||||
|
++ lib.optionals (cfg.settings.database.backend == "postgresql") finalPackage.optional-dependencies.postgres;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -44,6 +49,20 @@ in
|
|||||||
description = "User under which pretalx should run.";
|
description = "User under which pretalx should run.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins = lib.mkOption {
|
||||||
|
type = with lib.types; listOf package;
|
||||||
|
default = [];
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
with config.services.pretalx.package.plugins; [
|
||||||
|
pages
|
||||||
|
youtube
|
||||||
|
];
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Pretalx plugins to install into the Python environment.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
gunicorn.extraArgs = lib.mkOption {
|
gunicorn.extraArgs = lib.mkOption {
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
default = [
|
default = [
|
||||||
|
@ -5,13 +5,16 @@
|
|||||||
meta.maintainers = lib.teams.c3d2.members;
|
meta.maintainers = lib.teams.c3d2.members;
|
||||||
|
|
||||||
nodes = {
|
nodes = {
|
||||||
pretalx = {
|
pretalx = { config, ... }: {
|
||||||
networking.extraHosts = ''
|
networking.extraHosts = ''
|
||||||
127.0.0.1 talks.local
|
127.0.0.1 talks.local
|
||||||
'';
|
'';
|
||||||
|
|
||||||
services.pretalx = {
|
services.pretalx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
plugins = with config.services.pretalx.package.plugins; [
|
||||||
|
pages
|
||||||
|
];
|
||||||
nginx.domain = "talks.local";
|
nginx.domain = "talks.local";
|
||||||
settings = {
|
settings = {
|
||||||
site.url = "http://talks.local";
|
site.url = "http://talks.local";
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
, gettext
|
, gettext
|
||||||
, python3
|
, python3
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, plugins ? [ ]
|
||||||
, nixosTests
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -132,7 +133,7 @@ python.pkgs.buildPythonApplication rec {
|
|||||||
vobject
|
vobject
|
||||||
whitenoise
|
whitenoise
|
||||||
zxcvbn
|
zxcvbn
|
||||||
] ++ beautifulsoup4.optional-dependencies.lxml;
|
] ++ beautifulsoup4.optional-dependencies.lxml ++ plugins;
|
||||||
|
|
||||||
passthru.optional-dependencies = {
|
passthru.optional-dependencies = {
|
||||||
mysql = with python.pkgs; [
|
mysql = with python.pkgs; [
|
||||||
@ -210,6 +211,12 @@ python.pkgs.buildPythonApplication rec {
|
|||||||
tests = {
|
tests = {
|
||||||
inherit (nixosTests) pretalx;
|
inherit (nixosTests) pretalx;
|
||||||
};
|
};
|
||||||
|
plugins = lib.recurseIntoAttrs (
|
||||||
|
lib.packagesFromDirectoryRecursive {
|
||||||
|
inherit (python.pkgs) callPackage;
|
||||||
|
directory = ./plugins;
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit meta;
|
inherit meta;
|
||||||
|
30
pkgs/by-name/pr/pretalx/plugins/downstream.nix
Normal file
30
pkgs/by-name/pr/pretalx/plugins/downstream.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-downstream";
|
||||||
|
version = "1.2.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-downstream";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-MzoK/tzf6ajZ/THIXyad/tfb3lsQD9k9J6aBfoP9ONo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_downstream" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Use pretalx passively by importing another event's schedule";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-downstream";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
30
pkgs/by-name/pr/pretalx/plugins/media-ccc-de.nix
Normal file
30
pkgs/by-name/pr/pretalx/plugins/media-ccc-de.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-media-ccc-de";
|
||||||
|
version = "1.2.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-media-ccc-de";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-QCnZZpYjHxj92Dl2nRd4lXapufcqRmlVH6LEq0rzQ2U=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_media_ccc_de" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Pull recordings from media.ccc.de and embed them in talk pages";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-media-ccc-de";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
30
pkgs/by-name/pr/pretalx/plugins/pages.nix
Normal file
30
pkgs/by-name/pr/pretalx/plugins/pages.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-pages";
|
||||||
|
version = "1.4.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-pages";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-Wzd3uf+mdoyeMCZ4ZYcPLGqlUWCqSL02eeKRubTiH00=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_pages" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Static pages for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-pages";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
30
pkgs/by-name/pr/pretalx/plugins/public-voting.nix
Normal file
30
pkgs/by-name/pr/pretalx/plugins/public-voting.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-public-voting";
|
||||||
|
version = "1.5.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-public-voting";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-0dSnUVXtWEuu+m5PyFjjM2WVYE3+cNqZYlMkRQlI+2U=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_public_voting" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A public voting plugin for pretalx";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-public-voting";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
40
pkgs/by-name/pr/pretalx/plugins/venueless.nix
Normal file
40
pkgs/by-name/pr/pretalx/plugins/venueless.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
gettext,
|
||||||
|
setuptools,
|
||||||
|
django,
|
||||||
|
pyjwt,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-venueless";
|
||||||
|
version = "1.3.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-venueless";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-h8o5q1roFm8Bct/Qf8obIJYkkGPcz3WJ15quxZH48H8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ gettext ];
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
django
|
||||||
|
pyjwt
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_venueless" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Static venueless for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-venueless";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
30
pkgs/by-name/pr/pretalx/plugins/vimeo.nix
Normal file
30
pkgs/by-name/pr/pretalx/plugins/vimeo.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-vimeo";
|
||||||
|
version = "2.2.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-vimeo";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-CVP9C2wY51p8UDnzPpjzdVv5b9CSVanGbkaJiOo+9eY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_vimeo" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Static vimeo for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-vimeo";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
30
pkgs/by-name/pr/pretalx/plugins/youtube.nix
Normal file
30
pkgs/by-name/pr/pretalx/plugins/youtube.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "pretalx-youtube";
|
||||||
|
version = "2.1.0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pretalx";
|
||||||
|
repo = "pretalx-youtube";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-j3NZ+5QBbdpE2bxenqq5bW/42CWvQ9FqrKMmfYIe4Lo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pretalx_youtube" ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Static youtube for pretalx, e.g. information, venue listings, a Code of Conduct, etc";
|
||||||
|
homepage = "https://github.com/pretalx/pretalx-youtube";
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
maintainers = with lib.maintainers; [ wegank ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user