python.pkgs.zipfile36: move expression

This commit is contained in:
Frederik Rietdijk 2017-10-29 13:33:54 +01:00
parent bd941043b8
commit b35a257dfd
2 changed files with 34 additions and 25 deletions

View File

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, python
, isPy3k
, pythonOlder
}:
buildPythonPackage rec {
pname = "zipfile36";
version = "0.1.3";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "a78a8dddf4fa114f7fe73df76ffcce7538e23433b7a6a96c1c904023f122aead";
};
checkPhase = ''
${python.interpreter} -m unittest test_zipfile.py
'';
# Only works with Python 3.x.
# Not supposed to be used with 3.6 and up.
disabled = !(isPy3k && (pythonOlder "3.6"));
meta = {
description = "Read and write ZIP files - backport of the zipfile module from Python 3.6";
homepage = https://gitlab.com/takluyver/zipfile36;
license = lib.licenses.psfl;
maintainer = lib.maintainers.fridh;
};
}

View File

@ -26190,31 +26190,7 @@ EOF
zeroconf = callPackage ../development/python-modules/zeroconf { }; zeroconf = callPackage ../development/python-modules/zeroconf { };
zipfile36 = buildPythonPackage rec { zipfile36 = callPackage ../development/python-modules/zipfile36 { };
pname = "zipfile36";
version = "0.1.3";
name = "${pname}-${version}";
src = pkgs.fetchurl {
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz";
sha256 = "a78a8dddf4fa114f7fe73df76ffcce7538e23433b7a6a96c1c904023f122aead";
};
checkPhase = ''
${python.interpreter} -m unittest test_zipfile.py
'';
# Only works with Python 3.x.
# Not supposed to be used with 3.6 and up.
disabled = !(isPy3k && (pythonOlder "3.6"));
meta = {
description = "Read and write ZIP files - backport of the zipfile module from Python 3.6";
homepage = https://gitlab.com/takluyver/zipfile36;
license = licenses.psfl;
maintainer = maintainers.fridh;
};
};
todoist = callPackage ../development/python-modules/todoist { }; todoist = callPackage ../development/python-modules/todoist { };