diff options
Diffstat (limited to 'pkgs/development/python-modules/hjson/default.nix')
-rw-r--r-- | pkgs/development/python-modules/hjson/default.nix | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/hjson/default.nix b/pkgs/development/python-modules/hjson/default.nix index 44aa789f0d043..46ae9f518a34d 100644 --- a/pkgs/development/python-modules/hjson/default.nix +++ b/pkgs/development/python-modules/hjson/default.nix @@ -1,25 +1,34 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, python -, makeWrapper +{ + lib, + buildPythonPackage, + fetchFromGitHub, + makeWrapper, + pytestCheckHook, + python, + pythonOlder, + setuptools, }: buildPythonPackage rec { pname = "hjson"; version = "3.0.2"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.5"; - # N.B. pypi src tarball does not have tests src = fetchFromGitHub { owner = "hjson"; repo = "hjson-py"; - rev = "v${version}"; - sha256 = "1jc7j790rcqnhbrfj4lhnz3f6768dc55aij840wmx16jylfqpc2n"; + rev = "refs/tags/v${version}"; + hash = "sha256-VrCLHfXShF45IEhGVQpryBzjxreQEunyghazDNKRh8k="; }; + build-system = [ setuptools ]; + nativeBuildInputs = [ makeWrapper ]; + nativeCheckInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "hjson" ]; postInstall = '' @@ -29,11 +38,17 @@ buildPythonPackage rec { --prefix PATH : ${lib.makeBinPath [ python ]} ''; + disabledTestPaths = [ + # AttributeError: b'/build/source/hjson/tool.py:14: Deprecati[151 chars]ools' != b'' + "hjson/tests/test_tool.py" + ]; + meta = with lib; { description = "A user interface for JSON"; - mainProgram = "hjson"; homepage = "https://github.com/hjson/hjson-py"; + changelog = "https://github.com/hjson/hjson-py/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ bhipple ]; + mainProgram = "hjson"; }; } |