2017-05-28 10:08:10 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-08-02 00:23:27 +02:00
|
|
|
, fetchFromGitHub
|
2017-06-05 09:31:26 +02:00
|
|
|
, stdenv
|
2018-11-04 15:23:56 +01:00
|
|
|
, pytest
|
2017-05-28 10:08:10 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "simplejson";
|
2019-12-21 09:02:31 +01:00
|
|
|
version = "3.17.0";
|
2017-06-05 09:31:26 +02:00
|
|
|
doCheck = !stdenv.isDarwin;
|
2017-05-28 10:08:10 +02:00
|
|
|
|
2019-08-02 00:23:27 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2019-12-21 09:02:31 +01:00
|
|
|
sha256 = "1b1hhh1dia673vhq3jl2br1iqwb9yjii6iak56w96s9972vjbz3z";
|
2017-05-28 10:08:10 +02:00
|
|
|
};
|
|
|
|
|
2018-11-04 15:23:56 +01:00
|
|
|
# Package does not need pytest, but its a bit easier debugging.
|
|
|
|
checkInputs = [ pytest ];
|
|
|
|
# Ignore warnings because test does not expect them in stderr
|
|
|
|
# See https://github.com/simplejson/simplejson/issues/241
|
|
|
|
checkPhase = ''
|
|
|
|
PYTHONWARNINGS="ignore" pytest simplejson/tests
|
|
|
|
'';
|
|
|
|
|
2017-05-28 10:08:10 +02:00
|
|
|
meta = {
|
|
|
|
description = "A simple, fast, extensible JSON encoder/decoder for Python";
|
|
|
|
longDescription = ''
|
|
|
|
simplejson is compatible with Python 2.4 and later with no
|
|
|
|
external dependencies. It covers the full JSON specification
|
|
|
|
for both encoding and decoding, with unicode support. By
|
|
|
|
default, encoding is done in an encoding neutral fashion (plain
|
|
|
|
ASCII with \uXXXX escapes for unicode characters).
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/simplejson/simplejson";
|
2019-01-05 22:40:24 +01:00
|
|
|
license = with lib.licenses; [ mit afl21 ];
|
2017-05-28 10:08:10 +02:00
|
|
|
};
|
2017-06-05 09:31:26 +02:00
|
|
|
}
|