@@ -0,0 +1,76 @@
1+{ lib, buildPythonPackage, fetchPypi, callPackage
2+, isPy27, isPy34
3+, cleo
4+, requests
5+, cachy
6+, requests-toolbelt
7+, pyrsistent
8+, pyparsing
9+, cachecontrol
10+, pkginfo
11+, html5lib
12+, shellingham
13+, tomlkit
14+, typing
15+, pathlib2
16+, virtualenv
17+, functools32
18+, pytest
19+}:
20+
21+let
22+ cleo6 = cleo.overrideAttrs (oldAttrs: rec {
23+ version = "0.6.8";
24+ src = fetchPypi {
25+ inherit (oldAttrs) pname;
26+ inherit version;
27+ sha256 = "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5";
28+ };
29+ });
30+
31+ jsonschema3 = callPackage ./jsonschema.nix { };
32+
33+in buildPythonPackage rec {
34+ pname = "poetry";
35+ version = "0.12.10";
36+
37+ src = fetchPypi {
38+ inherit pname version;
39+ sha256 = "00npb0jlimnk4r01zkhfmns4843j1hfhd388s326da5pd8n0dq7l";
40+ };
41+
42+ postPatch = ''
43+ substituteInPlace pyproject.toml --replace "3.0a3" "3.0.0a3"
44+ substituteInPlace setup.py --replace "3.0a3" "3.0.0a3"
45+ '';
46+
47+ propagatedBuildInputs = [
48+ cleo6
49+ requests
50+ cachy
51+ requests-toolbelt
52+ jsonschema3
53+ pyrsistent
54+ pyparsing
55+ cachecontrol
56+ pkginfo
57+ html5lib
58+ shellingham
59+ tomlkit
60+ ] ++ lib.optionals (isPy27 || isPy34) [ typing pathlib2 ]
61+ ++ lib.optionals isPy27 [ virtualenv functools32 ];
62+
63+ # No tests in Pypi tarball
64+ doCheck = false;
65+ checkInputs = [ pytest ];
66+ checkPhase = ''
67+ pytest tests
68+ '';
69+
70+ meta = with lib; {
71+ homepage = https://github.com/sdispater/poetry;
72+ description = "Python dependency management and packaging made easy";
73+ license = licenses.mit;
74+ maintainers = with maintainers; [ jakewaksbaum ];
75+ };
76+}