@@ -1,22 +1,27 @@
1−{ stdenv, python37Packages, fetchFromGitHub, fetchurl, dialog, autoPatchelfHook }:
1+{ lib
2+, buildPythonApplication
3+, fetchFromGitHub
4+, ConfigArgParse, acme, configobj, cryptography, distro, josepy, parsedatetime, pyRFC3339, pyopenssl, pytz, requests, six, zope_component, zope_interface
5+, dialog, mock, gnureadline
6+, pytest_xdist, pytest, dateutil
7+}:
28
3−
4−python37Packages.buildPythonApplication rec {
9+buildPythonApplication rec {
510 pname = "certbot";
6− version = "1.0.0";
11+ version = "1.3.0";
712
813 src = fetchFromGitHub {
914 owner = pname;
1015 repo = pname;
1116 rev = "v${version}";
12− sha256 = "180x7gcpfbrzw8k654s7b5nxdy2yg61lq513dykyn3wz4gssw465";
17+ sha256 = "1nzp1l63f64qqp89y1vyd4lgfhykfp5dkr6iwfiyf273y7sjwpsa";
1318 };
1419
1520 patches = [
1621 ./0001-Don-t-use-distutils.StrictVersion-that-cannot-handle.patch
1722 ];
1823
19− propagatedBuildInputs = with python37Packages; [
24+ propagatedBuildInputs = [
2025 ConfigArgParse
2126 acme
2227 configobj
@@ -24,26 +29,21 @@ python37Packages.buildPythonApplication rec {
2429 distro
2530 josepy
2631 parsedatetime
27− psutil
2832 pyRFC3339
2933 pyopenssl
3034 pytz
35+ requests
3136 six
3237 zope_component
3338 zope_interface
3439 ];
3540
36− buildInputs = [ dialog ] ++ (with python37Packages; [ mock gnureadline ]);
41+ buildInputs = [ dialog mock gnureadline ];
3742
38− checkInputs = with python37Packages; [
39− pytest_xdist
40− pytest
41− dateutil
42− ];
43+ checkInputs = [ pytest_xdist pytest dateutil ];
4344
44− postPatch = ''
45+ preBuild = ''
4546 cd certbot
46− substituteInPlace certbot/_internal/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/bin/sendmail"
4747 '';
4848
4949 postInstall = ''
@@ -55,11 +55,11 @@ python37Packages.buildPythonApplication rec {
5555
5656 doCheck = true;
5757
58− meta = with stdenv.lib; {
58+ meta = with lib; {
5959 homepage = src.meta.homepage;
6060 description = "ACME client that can obtain certs and extensibly update server configurations";
6161 platforms = platforms.unix;
62− maintainers = [ maintainers.domenkozar ];
63− license = licenses.asl20;
62+ maintainers = with maintainers; [ domenkozar ];
63+ license = with licenses; [ asl20 ];
6464 };
6565}