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