diff --git a/pkgs/development/python-modules/pyjson5/default.nix b/pkgs/development/python-modules/pyjson5/default.nix new file mode 100644 index 000000000000..570ded76af2d --- /dev/null +++ b/pkgs/development/python-modules/pyjson5/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, cython +, fetchFromGitHub +, pythonOlder +, setuptools +, wheel +}: + +buildPythonPackage rec { + pname = "pyjson5"; + version = "1.6.6"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Kijewski"; + repo = "pyjson5"; + rev = "refs/tags/v${version}"; + hash = "sha256-LNcz9JEOw6HO9eIf71w4NJdPOB4yixBfBeD7B/NLbfE="; + fetchSubmodules = true; + }; + + build-system = [ + cython + setuptools + wheel + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ "pyjson5" ]; + + meta = with lib; { + description = "A JSON5 serializer and parser library"; + homepage = "https://github.com/Kijewski/pyjson5"; + changelog = "https://github.com/Kijewski/pyjson5/blob/${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index e75f863bbcbc..c849ddaba0a8 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -343,7 +343,6 @@ mapAliases ({ pyialarmxr = pyialarmxr-homeassistant; # added 2022-06-07 pyialarmxr-homeassistant = throw "The package was removed together with the component support in home-assistant 2022.7.0"; # added 2022-07-07 PyICU = pyicu; # Added 2022-12-22 - pyjson5 = json5; # added 2022-08-28 pyhs100 = throw "pyhs100 has been removed in favor of python-kasa."; # added 2024-01-05 pylibgen = throw "pylibgen is unmaintained upstreamed, and removed from nixpkgs"; # added 2020-06-20 PyLD = pyld; # added 2022-06-22 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 28fc5dbf9c84..b998360bed2c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11134,6 +11134,8 @@ self: super: with self; { pyjnius = callPackage ../development/python-modules/pyjnius { }; + pyjson5 = callPackage ../development/python-modules/pyjson5 { }; + pyjsparser = callPackage ../development/python-modules/pyjsparser { }; pyjwkest = callPackage ../development/python-modules/pyjwkest { };