Merge pull request #62931 from dtzWill/update/acme-tiny-4.0.4

acme-tiny: 2016-03-26 -> 4.0.4
This commit is contained in:
Franz Pletz 2019-06-10 14:35:39 +00:00 committed by GitHub
commit 567a05f6ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,34 +1,26 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, python, openssl }:
{ stdenv, buildPythonPackage, fetchPypi, setuptools_scm, fusepy, fuse
, openssl }:
buildPythonPackage rec {
pname = "acme-tiny";
version = "2016-03-26";
version = "4.0.4";
src = fetchFromGitHub {
sha256 = "0ngmr3kxcvlqa9mrv3gx0rg4r67xvdjplqfminxliri3ipak853g";
rev = "7a5a2558c8d6e5ab2a59b9fec9633d9e63127971";
repo = "acme-tiny";
owner = "diafygi";
src = fetchPypi {
inherit pname version;
sha256 = "0vqlmvk34jgvgx3qdsh50q7m4aiy02786jyjjcq45dcws7a4f9f1";
};
# source doesn't have any python "packaging" as such
configurePhase = " ";
buildPhase = " ";
# the tests are... complex
doCheck = false;
patchPhase = ''
substituteInPlace acme_tiny.py --replace "openssl" "${openssl.bin}/bin/openssl"
substituteInPlace acme_tiny.py --replace '"openssl"' '"${openssl.bin}/bin/openssl"'
substituteInPlace tests/monkey.py --replace '"openssl"' '"${openssl.bin}/bin/openssl"'
substituteInPlace tests/test_module.py --replace '"openssl"' '"${openssl.bin}/bin/openssl"'
substituteInPlace tests/monkey.py --replace /etc/ssl/openssl.cnf ${openssl.out}/etc/ssl/openssl.cnf
'';
installPhase = ''
mkdir -p $out/${python.sitePackages}/
cp acme_tiny.py $out/${python.sitePackages}/
mkdir -p $out/bin
ln -s $out/${python.sitePackages}/acme_tiny.py $out/bin/acme_tiny
chmod +x $out/bin/acme_tiny
'';
buildInputs = [ setuptools_scm ];
checkInputs = [ fusepy fuse ];
doCheck = false; # seems to hang, not sure
meta = with stdenv.lib; {
description = "A tiny script to issue and renew TLS certs from Let's Encrypt";