1{ stdenv, fetchPypi, fetchpatch
2, buildPythonPackage, python
3}:
4buildPythonPackage rec {
5 pname = "parse";
6 version = "1.6.6";
7 name = "${pname}-${version}";
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "71435aaac494e08cec76de646de2aab8392c114e56fe3f81c565ecc7eb886178";
12 };
13
14 patches = [
15 (fetchpatch {
16 name = "python-3.5-tests-compat.patch";
17 url = "https://github.com/r1chardj0n3s/parse/pull/34.patch";
18 sha256 = "16iicgkf3lwivmdnp3xkq4n87wjmr3nb77z8mwz67b7by9nnp3jg";
19 })
20 ];
21
22 checkPhase = ''
23 ${python.interpreter} test_parse.py
24 '';
25
26 meta = with stdenv.lib; {
27 homepage = https://github.com/r1chardj0n3s/parse;
28 description = "parse() is the opposite of format()";
29 license = licenses.bsdOriginal;
30 maintainers = with maintainers; [ alunduil ];
31 };
32}