From 7a0027804cf04b6907a1a0cc9186649c2a24011a Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 20 Mar 2018 22:25:02 +0100 Subject: [PATCH 1/4] josepy: init at 1.0.1 --- .../python-modules/josepy/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/josepy/default.nix diff --git a/pkgs/development/python-modules/josepy/default.nix b/pkgs/development/python-modules/josepy/default.nix new file mode 100644 index 000000000000..541455642ef5 --- /dev/null +++ b/pkgs/development/python-modules/josepy/default.nix @@ -0,0 +1,35 @@ +{ lib, fetchPypi, buildPythonPackage +# buildInputs +, six +, setuptools +, pyopenssl +, cryptography +}: + +buildPythonPackage rec { + pname = "josepy"; + version = "1.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "1k0ahzzaq2rrjiifwbhbp7vm8z4zk0ipgiqwicil80kzlf6bhj4z"; + }; + + propagatedBuildInputs = [ + pyopenssl + cryptography + six + setuptools + ]; + + # too many unpackaged check requirements + doCheck = false; + + meta = with lib; { + description = "JOSE protocol implementation in Python"; + homepage = https://github.com/jezdez/josepy; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + }; +} + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b513288da69c..1d3aa948877f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5219,6 +5219,8 @@ in { JPype1 = callPackage ../development/python-modules/JPype1 {}; + josepy = callPackage ../development/python-modules/josepy {}; + jsbeautifier = callPackage ../development/python-modules/jsbeautifier {}; jug = callPackage ../development/python-modules/jug {}; From e9f176a09a6a21119f6ba4a0ac7b3b0d1db330d1 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 20 Mar 2018 22:25:50 +0100 Subject: [PATCH 2/4] certbot: 0.19.0 -> 0.22.2 --- .../python-modules/acme/default.nix | 20 +++++++++++++++---- pkgs/tools/admin/certbot/default.nix | 12 +++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/acme/default.nix b/pkgs/development/python-modules/acme/default.nix index 71357e5bef23..ccf56c208f23 100644 --- a/pkgs/development/python-modules/acme/default.nix +++ b/pkgs/development/python-modules/acme/default.nix @@ -1,6 +1,18 @@ { stdenv, buildPythonPackage, fetchPypi -, certbot, nose, cryptography, pyasn1, pyopenssl, pyRFC3339 -, pytz, requests, six, werkzeug, mock, ndg-httpsclient }: +, certbot +, nose +, cryptography +, pyasn1 +, pyopenssl +, pyRFC3339 +, josepy +, pytz +, requests +, six +, werkzeug +, mock +, ndg-httpsclient +}: buildPythonPackage rec { inherit (certbot) src version; @@ -10,10 +22,10 @@ buildPythonPackage rec { propagatedBuildInputs = [ cryptography pyasn1 pyopenssl pyRFC3339 pytz requests six werkzeug mock - ndg-httpsclient + ndg-httpsclient josepy ]; - buildInputs = [ nose ]; + checkInputs = [ nose ]; postUnpack = "sourceRoot=\${sourceRoot}/acme"; } diff --git a/pkgs/tools/admin/certbot/default.nix b/pkgs/tools/admin/certbot/default.nix index 78a38e07cc29..bf2b4ac6799d 100644 --- a/pkgs/tools/admin/certbot/default.nix +++ b/pkgs/tools/admin/certbot/default.nix @@ -1,19 +1,19 @@ -{ stdenv, python2Packages, fetchFromGitHub, dialog }: +{ stdenv, pythonPackages, fetchFromGitHub, dialog }: # Latest version of certbot supports python3 and python3 version of pythondialog -python2Packages.buildPythonApplication rec { +pythonPackages.buildPythonApplication rec { name = "certbot-${version}"; - version = "0.19.0"; + version = "0.22.2"; src = fetchFromGitHub { owner = "certbot"; repo = "certbot"; rev = "v${version}"; - sha256 = "14i3q59v7j0q2pa1dri420fhil4h0vgl4vb471hp81f4y14gq6h7"; + sha256 = "08x80x9d71j84mwjm5wzd0x5gcw6gwyvkvadi2js39js6hfnc6jg"; }; - propagatedBuildInputs = with python2Packages; [ + propagatedBuildInputs = with pythonPackages; [ ConfigArgParse acme configobj @@ -28,7 +28,7 @@ python2Packages.buildPythonApplication rec { zope_component zope_interface ]; - buildInputs = [ dialog ] ++ (with python2Packages; [ nose mock gnureadline ]); + buildInputs = [ dialog ] ++ (with pythonPackages; [ nose mock gnureadline ]); patchPhase = '' substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/run/wrappers/bin/sendmail" From e144fa07b9f635ebef591b4c029a66fedaa7b7db Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 20 Mar 2018 22:26:30 +0100 Subject: [PATCH 3/4] simp_le: 0.6.2 -> 0.8.0 --- pkgs/tools/admin/simp_le/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/admin/simp_le/default.nix b/pkgs/tools/admin/simp_le/default.nix index ce416e7cd250..91656eb0c554 100644 --- a/pkgs/tools/admin/simp_le/default.nix +++ b/pkgs/tools/admin/simp_le/default.nix @@ -1,26 +1,26 @@ { stdenv, fetchFromGitHub, fetchpatch, pythonPackages }: - + pythonPackages.buildPythonApplication rec { pname = "simp_le-client"; - version = "0.6.1"; - name = "${pname}-${version}"; + version = "0.8.0"; src = pythonPackages.fetchPypi { inherit pname version; - sha256 = "0x4fky9jizs3xi55cdy217cvm3ikpghiabysan71b07ackkdfj6k"; + sha256 = "0nv9mm99rm8i9flgfgwvmajbsxb5rm162nfxlq3wk66bbbyr6y1i"; }; checkPhase = '' $out/bin/simp_le --test ''; - propagatedBuildInputs = with pythonPackages; [ acme setuptools_scm ]; + propagatedBuildInputs = with pythonPackages; [ acme setuptools_scm josepy ]; meta = with stdenv.lib; { homepage = https://github.com/zenhack/simp_le; description = "Simple Let's Encrypt client"; license = licenses.gpl3; - maintainers = with maintainers; [ gebner ]; + maintainers = with maintainers; [ gebner makefu ]; platforms = platforms.all; }; } + From 727c76765db60ce201c810bf282f3885b64e3644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 21 Mar 2018 10:14:52 +0100 Subject: [PATCH 4/4] simp_le: patch shebangs --- pkgs/tools/admin/simp_le/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/admin/simp_le/default.nix b/pkgs/tools/admin/simp_le/default.nix index 91656eb0c554..b618e71568d3 100644 --- a/pkgs/tools/admin/simp_le/default.nix +++ b/pkgs/tools/admin/simp_le/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, pythonPackages }: +{ stdenv, fetchFromGitHub, fetchpatch, pythonPackages, bash }: pythonPackages.buildPythonApplication rec { pname = "simp_le-client"; @@ -9,6 +9,11 @@ pythonPackages.buildPythonApplication rec { sha256 = "0nv9mm99rm8i9flgfgwvmajbsxb5rm162nfxlq3wk66bbbyr6y1i"; }; + postPatch = '' + substituteInPlace simp_le.py \ + --replace "/bin/sh" "${bash}/bin/sh" + ''; + checkPhase = '' $out/bin/simp_le --test '';