1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, lib
5, python
6, isPy27
7, enum34
8, attrs
9, pytz
10}:
11
12buildPythonPackage rec {
13 pname = "serpent";
14 version = "1.30.2";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "72753820246a7d8486e8b385353e3bbf769abfceec2e850fa527a288b084ff7a";
19 };
20
21 propagatedBuildInputs = lib.optionals isPy27 [ enum34 ];
22
23 checkInputs = [ attrs pytz ];
24 checkPhase = ''
25 ${python.interpreter} setup.py test
26 '';
27
28 meta = with stdenv.lib; {
29 description = "A simple serialization library based on ast.literal_eval";
30 homepage = "https://github.com/irmen/Serpent";
31 license = licenses.mit;
32 maintainers = with maintainers; [ prusnak ];
33 };
34}