git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #13467 from zimbatm/letsencrypt-0.4.0

letsencrypt: 0.1.0 -> 0.4.0

commit4704b81e8abe68e5ca6a067ce96327e3034f15e7 authorzimbatm <zimbatm@zimbatm.com> dateMon 29 Feb 2016, 11:02 (11 years ago) parent29e78b18104b8f
2 files changed+59−8
pkgs/tools/admin/letsencrypt/default.nix+21−7 pkgs/top-level/python-packages.nix+38−1
pkgs/tools/admin/letsencrypt/default.nix+21−7
@@ -1,22 +1,36 @@
1−{ stdenv, pythonPackages, fetchurl, dialog }:
1+{ stdenv, pythonPackages, fetchFromGitHub, dialog }:
22
33pythonPackages.buildPythonApplication rec {
4− version = "0.1.0";
54 name = "letsencrypt-${version}";
5+ version = "0.4.0";
66
7− src = fetchurl {
8− url = "https://github.com/letsencrypt/letsencrypt/archive/v${version}.tar.gz";
9− sha256 = "056y5bsmpc4ya5xxals4ypzsm927j6n5kwby3bjc03sy3sscf6hw";
7+ src = fetchFromGitHub {
8+ owner = "letsencrypt";
9+ repo = "letsencrypt";
10+ rev = "v${version}";
11+ sha256 = "0r2wis48w5nailzp2d5brkh2f40al6sbz816xx0akh3ll0rl1hbv";
1012 };
1113
1214 propagatedBuildInputs = with pythonPackages; [
13− zope_interface zope_component six requests2 pytz pyopenssl psutil mock acme
14− cryptography configobj pyRFC3339 python2-pythondialog parsedatetime ConfigArgParse
15+ ConfigArgParse
16+ acme
17+ configobj
18+ cryptography
19+ parsedatetime
20+ psutil
21+ pyRFC3339
22+ pyopenssl
23+ python2-pythondialog
24+ pytz
25+ six
26+ zope_component
27+ zope_interface
1528 ];
1629 buildInputs = with pythonPackages; [ nose dialog ];
1730
1831 patchPhase = ''
1932 substituteInPlace letsencrypt/notify.py --replace "/usr/sbin/sendmail" "/var/setuid-wrappers/sendmail"
33+ substituteInPlace letsencrypt/le_util.py --replace "sw_vers" "/usr/bin/sw_vers"
2034 '';
2135
2236 postInstall = ''
pkgs/top-level/python-packages.nix+38−1
@@ -260,7 +260,44 @@ in modules // {
260260
261261 buildInputs = with self; [ nose ];
262262
263− sourceRoot = "letsencrypt-${version}/acme";
263+ sourceRoot = "letsencrypt-v${version}-src/acme";
264+ };
265+
266+ acme-tiny = buildPythonPackage rec {
267+ name = "acme-tiny-${version}";
268+ version = "20151229";
269+ rev = "f61f72c212cea27f388eb4a26ede0d65035bdb53";
270+
271+ src = pkgs.fetchgit {
272+ inherit rev;
273+ url = "https://github.com/diafygi/acme-tiny.git";
274+ sha256 = "dde59354e483bdff3dfd06717c094889ae673efb568e40b150b4695b0c539649";
275+ };
276+
277+ # source doesn't have any python "packaging" as such
278+ configurePhase = " ";
279+ buildPhase = " ";
280+ # the tests are... complex
281+ doCheck = false;
282+
283+ patchPhase = ''
284+ substituteInPlace acme_tiny.py --replace "openssl" "${pkgs.openssl}/bin/openssl"
285+ substituteInPlace letsencrypt/le_util.py --replace '"sw_vers"' '"/usr/bin/sw_vers"'
286+ '';
287+
288+ installPhase = ''
289+ mkdir -p $out/${python.sitePackages}/
290+ cp acme_tiny.py $out/${python.sitePackages}/
291+ mkdir -p $out/bin
292+ ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny
293+ chmod +x $out/bin/acme_tiny
294+ '';
295+
296+ meta = {
297+ description = "A tiny script to issue and renew TLS certs from Let's Encrypt";
298+ homepage = https://github.com/diafygi/acme-tiny;
299+ license = licenses.mit;
300+ };
264301 };
265302
266303 acme-tiny = buildPythonPackage rec {