2022-02-10 20:34:41 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, six, lark, pytestCheckHook }:
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "commentjson";
|
|
|
|
version = "0.9.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "vaidik";
|
|
|
|
repo = "commentjson";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-dPnIcv7TIeyG7rU938w7FrDklmaGuPpXz34uw/JjOgY=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace "lark-parser>=0.7.1,<0.8.0" "lark"
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
# NixOS is missing test.test_json module
|
|
|
|
rm -r commentjson/tests/test_json
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
propagatedBuildInputs = [ lark six ];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|