1{ lib, buildPythonPackage, fetchFromGitHub, six, lark, pytestCheckHook }: 2 3buildPythonPackage rec { 4 pname = "commentjson"; 5 version = "0.9.0"; 6 7 src = fetchFromGitHub { 8 owner = "vaidik"; 9 repo = "commentjson"; 10 rev = "v${version}"; 11 hash = "sha256-dPnIcv7TIeyG7rU938w7FrDklmaGuPpXz34uw/JjOgY="; 12 }; 13 14 postPatch = '' 15 substituteInPlace setup.py \ 16 --replace "lark-parser>=0.7.1,<0.8.0" "lark" 17 18 # NixOS is missing test.test_json module 19 rm -r commentjson/tests/test_json 20 ''; 21 22 propagatedBuildInputs = [ lark six ]; 23 24 nativeCheckInputs = [ pytestCheckHook ]; 25 26 pythonImportsCheck = [ "commentjson" ]; 27 28 meta = with lib; { 29 description = "Add JavaScript or Python style comments in JSON"; 30 homepage = "https://github.com/vaidik/commentjson/"; 31 license = licenses.mit; 32 maintainers = with maintainers; [ ]; 33 }; 34}