1{ lib
2, buildPythonPackage
3, fetchPypi
4, stdenv
5, isPy3k
6, pytest
7}:
8
9buildPythonPackage rec {
10 pname = "simplejson";
11 version = "3.16.0";
12 doCheck = !stdenv.isDarwin;
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "b1f329139ba647a9548aa05fb95d046b4a677643070dc2afc05fa2e975d09ca5";
17 };
18
19 # Package does not need pytest, but its a bit easier debugging.
20 checkInputs = [ pytest ];
21 # Ignore warnings because test does not expect them in stderr
22 # See https://github.com/simplejson/simplejson/issues/241
23 checkPhase = ''
24 PYTHONWARNINGS="ignore" pytest simplejson/tests
25 '';
26
27 meta = {
28 description = "A simple, fast, extensible JSON encoder/decoder for Python";
29 longDescription = ''
30 simplejson is compatible with Python 2.4 and later with no
31 external dependencies. It covers the full JSON specification
32 for both encoding and decoding, with unicode support. By
33 default, encoding is done in an encoding neutral fashion (plain
34 ASCII with \uXXXX escapes for unicode characters).
35 '';
36 homepage = https://github.com/simplejson/simplejson;
37 license = with lib.licenses; [ mit afl21 ];
38 };
39}