python3Packages.commentjson: init at 0.9.0

This commit is contained in:
Sandro Jäckel 2021-05-23 18:24:10 +02:00 committed by Martin Weinelt
parent 5047c27e2a
commit b36764fcbe
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{ lib, buildPythonPackage, fetchFromGitHub, six, lark-parser, pytestCheckHook }:
buildPythonPackage rec {
pname = "commentjson";
version = "0.9.0";
src = fetchFromGitHub {
owner = "vaidik";
repo = "commentjson";
rev = "v${version}";
sha256 = "sha256-dPnIcv7TIeyG7rU938w7FrDklmaGuPpXz34uw/JjOgY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "lark-parser>=0.7.1,<0.8.0" "lark-parser"
# NixOS is missing test.test_json module
rm -r commentjson/tests/test_json
'';
propagatedBuildInputs = [ lark-parser six ];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "commentjson" ];
meta = with lib; {
description = "Add JavaScript or Python style comments in JSON";
homepage = "https://github.com/vaidik/commentjson/";
license = licenses.mit;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View File

@ -1519,6 +1519,8 @@ in {
commandparse = callPackage ../development/python-modules/commandparse { };
commentjson = callPackage ../development/python-modules/commentjson { };
commoncode = callPackage ../development/python-modules/commoncode { };
CommonMark = callPackage ../development/python-modules/commonmark { };