Still actively developed and yet stuck on python2. Also marked as vulnerable and their issue tracker contains yet another security issue reported in 2021/10 that the upstream hasn't acknowledged yet. Mind blown. Closes: #135543, #97274, #97275main
parent
608cde3bd4
commit
369db3b2f3
@ -1,74 +0,0 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
|
||||
cfg = config.services.mailpile; |
||||
|
||||
hostname = cfg.hostname; |
||||
port = cfg.port; |
||||
|
||||
in |
||||
|
||||
{ |
||||
|
||||
###### interface |
||||
|
||||
options = { |
||||
|
||||
services.mailpile = { |
||||
enable = mkEnableOption "Mailpile the mail client"; |
||||
|
||||
hostname = mkOption { |
||||
type = types.str; |
||||
default = "localhost"; |
||||
description = "Listen to this hostname or ip."; |
||||
}; |
||||
port = mkOption { |
||||
type = types.port; |
||||
default = 33411; |
||||
description = "Listen on this port."; |
||||
}; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
|
||||
###### implementation |
||||
|
||||
config = mkIf config.services.mailpile.enable { |
||||
|
||||
users.users.mailpile = |
||||
{ uid = config.ids.uids.mailpile; |
||||
description = "Mailpile user"; |
||||
createHome = true; |
||||
home = "/var/lib/mailpile"; |
||||
}; |
||||
|
||||
users.groups.mailpile = |
||||
{ gid = config.ids.gids.mailpile; |
||||
}; |
||||
|
||||
systemd.services.mailpile = |
||||
{ |
||||
description = "Mailpile server."; |
||||
after = [ "network.target" ]; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
serviceConfig = { |
||||
User = "mailpile"; |
||||
ExecStart = "${pkgs.mailpile}/bin/mailpile --www ${hostname}:${port} --wait"; |
||||
# mixed - first send SIGINT to main process, |
||||
# then after 2min send SIGKILL to whole group if neccessary |
||||
KillMode = "mixed"; |
||||
KillSignal = "SIGINT"; # like Ctrl+C - safe mailpile shutdown |
||||
TimeoutSec = 120; # wait 2min untill SIGKILL |
||||
}; |
||||
environment.MAILPILE_HOME = "/var/lib/mailpile/.local/share/Mailpile"; |
||||
}; |
||||
|
||||
environment.systemPackages = [ pkgs.mailpile ]; |
||||
|
||||
}; |
||||
|
||||
} |
@ -1,52 +0,0 @@ |
||||
{ lib, fetchFromGitHub, python2Packages, gnupg1orig, openssl, git }: |
||||
|
||||
python2Packages.buildPythonApplication rec { |
||||
pname = "mailpile"; |
||||
version = "1.0.0rc2"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "mailpile"; |
||||
repo = "Mailpile"; |
||||
rev = version; |
||||
sha256 = "1z5psh00fjr8gnl4yjcl4m9ywfj24y1ffa2rfb5q8hq4ksjblbdj"; |
||||
}; |
||||
|
||||
postPatch = '' |
||||
patchShebangs scripts |
||||
''; |
||||
|
||||
nativeBuildInputs = with python2Packages; [ pbr git ]; |
||||
PBR_VERSION=version; |
||||
|
||||
propagatedBuildInputs = with python2Packages; [ |
||||
appdirs |
||||
cryptography |
||||
fasteners |
||||
gnupg1orig |
||||
jinja2 |
||||
pgpdump |
||||
pillow |
||||
python2Packages.lxml |
||||
spambayes |
||||
]; |
||||
|
||||
postInstall = '' |
||||
wrapProgram $out/bin/mailpile \ |
||||
--prefix PATH ":" "${lib.makeBinPath [ gnupg1orig openssl ]}" \ |
||||
--set-default MAILPILE_SHARED "$out/share/mailpile" |
||||
''; |
||||
|
||||
# No tests were found |
||||
doCheck = false; |
||||
|
||||
meta = with lib; { |
||||
description = "A modern, fast web-mail client with user-friendly encryption and privacy features"; |
||||
homepage = "https://www.mailpile.is/"; |
||||
license = [ licenses.asl20 licenses.agpl3 ]; |
||||
platforms = platforms.linux; |
||||
maintainers = [ ]; |
||||
knownVulnerabilities = [ |
||||
"Numerous and uncounted, upstream has requested we not package it. See more: https://github.com/NixOS/nixpkgs/pull/23058#issuecomment-283515104" |
||||
]; |
||||
}; |
||||
} |
Loading…
Reference in new issue