nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 86 lines 2.3 kB view raw
1{ 2 lib, 3 python3, 4 fetchurl, 5 nixosTests, 6 fetchpatch, 7}: 8 9with python3.pkgs; 10 11buildPythonPackage rec { 12 pname = "hyperkitty"; 13 version = "1.3.12"; 14 pyproject = true; 15 16 src = fetchurl { 17 url = "https://gitlab.com/mailman/hyperkitty/-/releases/${version}/downloads/hyperkitty-${version}.tar.gz"; 18 hash = "sha256-3rWCk37FvJ6pwdXYa/t2pNpCm2Dh/qb9aWTnxmfPFh0="; 19 }; 20 21 patches = [ 22 # Fix test with mistune >= 3.1 23 (fetchpatch { 24 url = "https://gitlab.com/mailman/hyperkitty/-/commit/2d69f420c603356a639a6b6243e1059a0089b7eb.patch"; 25 hash = "sha256-zo+dK8DFMkHlMrOVSUtelhAq+cxJE4gLG00LvuAlWKA="; 26 }) 27 # Fix test with python 3.13 28 # https://gitlab.com/mailman/hyperkitty/-/merge_requests/657 29 (fetchpatch { 30 url = "https://gitlab.com/mailman/hyperkitty/-/commit/6c3d402dc0981e545081a3baf13db7e491356e75.patch"; 31 hash = "sha256-ep9cFZe9/sIfIP80pLBOMYkJKWvNT7DRqg80DQSdRFw="; 32 }) 33 ]; 34 35 build-system = [ 36 pdm-backend 37 ]; 38 39 dependencies = [ 40 django 41 django-gravatar2 42 django-haystack 43 django-mailman3 44 django-q2 45 django-compressor 46 django-extensions 47 djangorestframework 48 flufl-lock 49 mistune 50 networkx 51 psycopg2 52 python-dateutil 53 robot-detection 54 ]; 55 56 # Some of these are optional runtime dependencies that are not 57 # listed as dependencies in pyproject.toml. To use these, they 58 # should be dependencies of the Django Python environment, but not 59 # of HyperKitty so they're not included for people who don't need 60 # them. 61 nativeCheckInputs = [ 62 beautifulsoup4 63 elastic-transport 64 elasticsearch 65 mock 66 whoosh 67 ] 68 ++ beautifulsoup4.optional-dependencies.lxml; 69 70 checkPhase = '' 71 cd $NIX_BUILD_TOP/$sourceRoot 72 PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test \ 73 --settings=hyperkitty.tests.settings_test hyperkitty 74 ''; 75 76 passthru.tests = { inherit (nixosTests) mailman; }; 77 78 meta = { 79 changelog = "https://docs.mailman3.org/projects/hyperkitty/en/latest/news.html"; 80 homepage = "https://www.gnu.org/software/mailman/"; 81 description = "Archiver for GNU Mailman v3"; 82 license = lib.licenses.gpl3; 83 platforms = lib.platforms.linux; 84 maintainers = with lib.maintainers; [ qyliss ]; 85 }; 86}