2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
makeWrapper,
|
|
|
|
pytestCheckHook,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2020-11-30 08:33:03 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hjson";
|
|
|
|
version = "3.0.2";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
2020-11-30 08:33:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hjson";
|
|
|
|
repo = "hjson-py";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-VrCLHfXShF45IEhGVQpryBzjxreQEunyghazDNKRh8k=";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-12-09 12:39:15 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
pythonImportsCheck = [ "hjson" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm $out/bin/hjson.cmd
|
2021-12-21 02:18:32 +00:00
|
|
|
wrapProgram $out/bin/hjson \
|
|
|
|
--set PYTHONPATH "$PYTHONPATH" \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ python ]}
|
2020-12-09 12:39:15 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# AttributeError: b'/build/source/hjson/tool.py:14: Deprecati[151 chars]ools' != b''
|
|
|
|
"hjson/tests/test_tool.py"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "User interface for JSON";
|
2020-11-30 08:33:03 +00:00
|
|
|
homepage = "https://github.com/hjson/hjson-py";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/hjson/hjson-py/releases/tag/v${version}";
|
2020-11-30 08:33:03 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
2024-05-15 15:35:15 +00:00
|
|
|
mainProgram = "hjson";
|
2020-11-30 08:33:03 +00:00
|
|
|
};
|
|
|
|
}
|