mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
Merge pull request #297827 from mweinelt/pantalaimon
pantalaimon: refactor
This commit is contained in:
commit
dc5ac0dcc3
@ -1,31 +1,41 @@
|
||||
{ lib, stdenv, buildPythonApplication, fetchFromGitHub, pythonOlder,
|
||||
attrs, aiohttp, appdirs, click, keyring, logbook, peewee, janus,
|
||||
prompt-toolkit, matrix-nio, dbus-python, pydbus, notify2, pygobject3,
|
||||
setuptools, installShellFiles, nixosTests,
|
||||
|
||||
pytest, faker, pytest-aiohttp, aioresponses,
|
||||
|
||||
enableDbusUi ? true
|
||||
{ lib
|
||||
, stdenv
|
||||
, python3Packages
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, nixosTests
|
||||
, enableDbusUi ? true
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "pantalaimon";
|
||||
version = "0.10.5";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
pyproject = true;
|
||||
|
||||
# pypi tarball miss tests
|
||||
src = fetchFromGitHub {
|
||||
owner = "matrix-org";
|
||||
repo = pname;
|
||||
repo = "pantalaimon";
|
||||
rev = version;
|
||||
sha256 = "sha256-yMhE3wKRbFHoL0vdFR8gMkNU7Su4FHbAwKQYADaaWpk=";
|
||||
hash = "sha256-yMhE3wKRbFHoL0vdFR8gMkNU7Su4FHbAwKQYADaaWpk=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
build-system = [
|
||||
installShellFiles
|
||||
] ++ (with python3Packages; [
|
||||
setuptools
|
||||
pythonRelaxDepsHook
|
||||
]);
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"matrix-nio"
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
aiohttp
|
||||
appdirs
|
||||
attrs
|
||||
cachetools
|
||||
click
|
||||
janus
|
||||
keyring
|
||||
@ -33,34 +43,28 @@ buildPythonApplication rec {
|
||||
matrix-nio
|
||||
peewee
|
||||
prompt-toolkit
|
||||
setuptools
|
||||
]
|
||||
++ matrix-nio.optional-dependencies.e2e
|
||||
++ lib.optionals enableDbusUi [
|
||||
dbus-python
|
||||
notify2
|
||||
pygobject3
|
||||
pydbus
|
||||
++ lib.optionals enableDbusUi optional-dependencies.ui;
|
||||
|
||||
optional-dependencies.ui = with python3Packages; [
|
||||
dbus-python
|
||||
notify2
|
||||
pygobject3
|
||||
pydbus
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
aioresponses
|
||||
faker
|
||||
pytest-aiohttp
|
||||
aioresponses
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
];
|
||||
pytestCheckHook
|
||||
]
|
||||
++ lib.flatten (lib.attrValues optional-dependencies);
|
||||
|
||||
# darwin has difficulty communicating with server, fails some integration tests
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
checkPhase = ''
|
||||
pytest
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installManPage docs/man/*.[1-9]
|
||||
'';
|
||||
|
@ -33978,9 +33978,9 @@ with pkgs;
|
||||
|
||||
paprefs = callPackage ../applications/audio/paprefs { };
|
||||
|
||||
pantalaimon = python3Packages.callPackage ../applications/networking/instant-messengers/pantalaimon { };
|
||||
pantalaimon = callPackage ../applications/networking/instant-messengers/pantalaimon { };
|
||||
|
||||
pantalaimon-headless = python3Packages.callPackage ../applications/networking/instant-messengers/pantalaimon {
|
||||
pantalaimon-headless = callPackage ../applications/networking/instant-messengers/pantalaimon {
|
||||
enableDbusUi = false;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user