Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 16.09 50 lines 1.3 kB view raw
1{ stdenv, pythonPackages, fetchFromGitHub, dialog }: 2 3pythonPackages.buildPythonApplication rec { 4 name = "certbot-${version}"; 5 version = "0.6.0"; 6 7 src = fetchFromGitHub { 8 owner = "certbot"; 9 repo = "certbot"; 10 rev = "v${version}"; 11 sha256 = "1x0prlldkgg0hxmya4m5h3k3c872wr0jylmzpr3m04mk339yiw0c"; 12 }; 13 14 propagatedBuildInputs = with pythonPackages; [ 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 28 ]; 29 buildInputs = [ dialog ] ++ (with pythonPackages; [ nose mock gnureadline ]); 30 31 patchPhase = '' 32 substituteInPlace certbot/notify.py --replace "/usr/sbin/sendmail" "/var/setuid-wrappers/sendmail" 33 substituteInPlace certbot/le_util.py --replace "sw_vers" "/usr/bin/sw_vers" 34 ''; 35 36 postInstall = '' 37 for i in $out/bin/*; do 38 wrapProgram "$i" --prefix PYTHONPATH : "$PYTHONPATH" \ 39 --prefix PATH : "${dialog}/bin:$PATH" 40 done 41 ''; 42 43 meta = with stdenv.lib; { 44 homepage = src.meta.homepage; 45 description = "ACME client that can obtain certs and extensibly update server configurations"; 46 platforms = platforms.unix; 47 maintainers = [ maintainers.domenkozar ]; 48 license = licenses.asl20; 49 }; 50}