diff options
Diffstat (limited to 'pkgs/development/python-modules/hy/default.nix')
-rw-r--r-- | pkgs/development/python-modules/hy/default.nix | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/hy/default.nix b/pkgs/development/python-modules/hy/default.nix index 63625bd7ee6..a962f86854f 100644 --- a/pkgs/development/python-modules/hy/default.nix +++ b/pkgs/development/python-modules/hy/default.nix @@ -4,31 +4,44 @@ , colorama , fetchFromGitHub , funcparserlib +, hy , pytestCheckHook +, python , pythonOlder , rply +, testers +, toPythonApplication +, hyDefinedPythonPackages ? python-packages: [ ] /* Packages like with python.withPackages */ }: buildPythonPackage rec { pname = "hy"; - version = "1.0a3"; + version = "1.0a4"; + format = "setuptools"; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "hylang"; repo = pname; rev = version; - sha256 = "1dqw24rvsps2nab1pbjjm1c81vrs34r4kkk691h3xdyxnv9hb84b"; + sha256 = "sha256-MBzp3jqBg/kH233wcgYYHc+Yg9GuOaBsXIfjFDihD1E="; }; + # https://github.com/hylang/hy/blob/1.0a4/get_version.py#L9-L10 + HY_VERSION = version; + propagatedBuildInputs = [ colorama funcparserlib - rply - ] ++ lib.optionals (pythonOlder "3.9") [ + rply # TODO: remove on the next release + ] + ++ lib.optionals (pythonOlder "3.9") [ astor - ]; + ] + # for backwards compatibility with removed pkgs/development/interpreters/hy + # See: https://github.com/NixOS/nixpkgs/issues/171428 + ++ (hyDefinedPythonPackages python.pkgs); checkInputs = [ pytestCheckHook @@ -43,10 +56,22 @@ buildPythonPackage rec { pythonImportsCheck = [ "hy" ]; + passthru = { + tests.version = testers.testVersion { + package = hy; + command = "hy -v"; + }; + # also for backwards compatibility with removed pkgs/development/interpreters/hy + withPackages = python-packages: (toPythonApplication hy).override { + hyDefinedPythonPackages = python-packages; + }; + }; + meta = with lib; { - description = "Python to/from Lisp layer"; - homepage = "https://github.com/hylang/hy"; + description = "A LISP dialect embedded in Python"; + homepage = "https://hylang.org/"; + changelog = "https://github.com/hylang/hy/releases/tag/${version}"; license = licenses.mit; - maintainers = with maintainers; [ fab ]; + maintainers = with maintainers; [ fab mazurel nixy thiagokokada ]; }; } |