3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/getmail6/default.nix
2022-09-30 20:47:27 -05:00

37 lines
953 B
Nix

{ lib
, python3
, fetchFromGitHub
}:
python3.pkgs.buildPythonApplication rec {
pname = "getmail6";
version = "6.18.10";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-nRi0HUq8jEugFogerFD7Xu9fgn1njfumbwhChz2t4t8=";
};
# needs a Docker setup
doCheck = false;
pythonImportsCheck = [ "getmailcore" ];
postPatch = ''
# getmail spends a lot of effort to build an absolute path for
# documentation installation; too bad it is counterproductive now
sed -e '/datadir or prefix,/d' -i setup.py
sed -e 's,/usr/bin/getmail,$(dirname $0)/getmail,' -i getmails
'';
meta = with lib; {
description = "A program for retrieving mail";
homepage = "https://getmail6.org";
changelog = "https://github.com/getmail6/getmail6/blob/${src.rev}/docs/CHANGELOG";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ abbe dotlambda ];
};
}