nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3,
4 fetchPypi,
5 sassc,
6 hyperkitty,
7 postorius,
8 nixosTests,
9}:
10
11with python3.pkgs;
12
13buildPythonPackage rec {
14 pname = "mailman_web";
15 version = "0.0.9";
16 pyproject = true;
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-3wnduej6xMQzrjGhGXQznfJud/Uoy3BDduukRJeahL8=";
21 };
22
23 postPatch = ''
24 # Upstream seems to mostly target installing on top of existing
25 # distributions, and uses a path appropriate for that, but we are
26 # a distribution, so use a state directory appropriate for a
27 # distro package.
28 substituteInPlace mailman_web/settings/base.py \
29 --replace-fail /opt/mailman/web /var/lib/mailman-web
30 '';
31
32 nativeBuildInputs = [ pdm-backend ];
33 propagatedBuildInputs = [
34 hyperkitty
35 postorius
36 whoosh
37 ];
38
39 # Tries to check runtime configuration.
40 doCheck = false;
41
42 makeWrapperArgs = [
43 "--suffix PATH : ${lib.makeBinPath [ sassc ]}"
44 ];
45
46 passthru.tests = { inherit (nixosTests) mailman; };
47
48 meta = {
49 homepage = "https://gitlab.com/mailman/mailman-web";
50 description = "Django project for Mailman 3 web interface";
51 mainProgram = "mailman-web";
52 license = lib.licenses.gpl3Plus;
53 maintainers = with lib.maintainers; [
54 qyliss
55 m1cr0man
56 ];
57 };
58}