mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
80 lines
2 KiB
Nix
80 lines
2 KiB
Nix
{ lib
|
|
, python3
|
|
, fetchPypi
|
|
, fetchpatch
|
|
, nixosTests
|
|
}:
|
|
|
|
with python3.pkgs;
|
|
|
|
buildPythonPackage rec {
|
|
pname = "HyperKitty";
|
|
version = "1.3.7";
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-TXSso+wwVGdBymIzns5yOS4pj1EdConmm87b/NyBAss=";
|
|
};
|
|
|
|
patches = [
|
|
./0001-Disable-broken-test_help_output-testcase.patch
|
|
(fetchpatch {
|
|
url = "https://gitlab.com/mailman/hyperkitty/-/commit/5bb394662882bfc73c3e877458da44343aa06922.patch";
|
|
hash = "sha256-9vcY6nu3txDftH6aYpdh9qSrLzZceGjVFxuD1Ux18gw=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
# isort is a development dependency
|
|
sed -i '/isort/d' setup.py
|
|
# Fix mistune imports for mistune >= 2.0.0
|
|
# https://gitlab.com/mailman/hyperkitty/-/merge_requests/379
|
|
sed -i 's/mistune.scanner/mistune.util/' hyperkitty/lib/renderer.py
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
django
|
|
django-gravatar2
|
|
django-haystack
|
|
django-mailman3
|
|
django-q
|
|
django-compressor
|
|
django-extensions
|
|
djangorestframework
|
|
flufl_lock
|
|
mistune
|
|
networkx
|
|
psycopg2
|
|
python-dateutil
|
|
robot-detection
|
|
];
|
|
|
|
# Some of these are optional runtime dependencies that are not
|
|
# listed as dependencies in setup.py. To use these, they should be
|
|
# dependencies of the Django Python environment, but not of
|
|
# HyperKitty so they're not included for people who don't need them.
|
|
nativeCheckInputs = [
|
|
beautifulsoup4
|
|
elasticsearch
|
|
mock
|
|
whoosh
|
|
] ++ beautifulsoup4.optional-dependencies.lxml;
|
|
|
|
checkPhase = ''
|
|
cd $NIX_BUILD_TOP/$sourceRoot
|
|
PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test \
|
|
--settings=hyperkitty.tests.settings_test hyperkitty
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) mailman; };
|
|
|
|
meta = {
|
|
homepage = "https://www.gnu.org/software/mailman/";
|
|
description = "Archiver for GNU Mailman v3";
|
|
license = lib.licenses.gpl3;
|
|
platforms = lib.platforms.linux;
|
|
maintainers = with lib.maintainers; [ qyliss ];
|
|
};
|
|
}
|