Merge pull request #194558 from thiagokokada/bump-hy

hy: 1.0a4 -> 0.24.0
This commit is contained in:
Thiago Kenji Okada 2022-10-08 11:45:09 +01:00 committed by GitHub
commit e899911545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 32 deletions

View file

@ -1,7 +1,6 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, poetry-core , poetry-core
, python , python
, pytestCheckHook , pytestCheckHook
@ -11,7 +10,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "funcparserlib"; pname = "funcparserlib";
version = "1.0.0a0"; version = "1.0.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
@ -20,7 +19,7 @@ buildPythonPackage rec {
owner = "vlasovskikh"; owner = "vlasovskikh";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-YfcboKjyc5ASzrp0duu2R6psf51MGZIeZ0owo5QNSnU="; sha256 = "sha256-moWaOzyF/yhDQCLEp7bc0j8wNv7FM7cvvpCwon3j+gI=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -32,15 +31,6 @@ buildPythonPackage rec {
six six
]; ];
patches = [
# Support for poetry-core, https://github.com/vlasovskikh/funcparserlib/pull/73
(fetchpatch {
name = "support-poetry-core.patch";
url = "https://github.com/vlasovskikh/funcparserlib/commit/61ed558fc146b7a30879919325dfa8aae77be556.patch";
sha256 = "sha256-tqdR3r4/t7RWBYZeAabaN7oYf6VxkVVz006XICX9rYI=";
})
];
pythonImportsCheck = [ pythonImportsCheck = [
"funcparserlib" "funcparserlib"
]; ];

View file

@ -10,13 +10,11 @@
, pythonOlder , pythonOlder
, rply , rply
, testers , testers
, toPythonApplication
, hyDefinedPythonPackages ? python-packages: [ ] /* Packages like with python.withPackages */
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "hy"; pname = "hy";
version = "1.0a4"; version = "0.24.0";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -25,7 +23,7 @@ buildPythonPackage rec {
owner = "hylang"; owner = "hylang";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "sha256-MBzp3jqBg/kH233wcgYYHc+Yg9GuOaBsXIfjFDihD1E="; sha256 = "sha256-PmnYOniYqNHGTxpWuAc+zBhOsgRgMMbERHq81KpHheg=";
}; };
# https://github.com/hylang/hy/blob/1.0a4/get_version.py#L9-L10 # https://github.com/hylang/hy/blob/1.0a4/get_version.py#L9-L10
@ -34,24 +32,23 @@ buildPythonPackage rec {
propagatedBuildInputs = [ propagatedBuildInputs = [
colorama colorama
funcparserlib funcparserlib
rply # TODO: remove on the next release ] ++
] lib.optionals (pythonOlder "3.9") [
++ lib.optionals (pythonOlder "3.9") [
astor astor
] ];
# for backwards compatibility with removed pkgs/development/interpreters/hy
# See: https://github.com/NixOS/nixpkgs/issues/171428
++ (hyDefinedPythonPackages python.pkgs);
checkInputs = [ checkInputs = [
pytestCheckHook pytestCheckHook
]; ];
preCheck = ''
# For test_bin_hy
export PATH="$out/bin:$PATH"
'';
disabledTests = [ disabledTests = [
# Don't test the binary "test_circular_macro_require"
"test_bin_hy" "test_macro_require"
"test_hystartup"
"est_hy2py_import"
]; ];
pythonImportsCheck = [ "hy" ]; pythonImportsCheck = [ "hy" ];
@ -61,10 +58,10 @@ buildPythonPackage rec {
package = hy; package = hy;
command = "hy -v"; command = "hy -v";
}; };
# also for backwards compatibility with removed pkgs/development/interpreters/hy # For backwards compatibility with removed pkgs/development/interpreters/hy
withPackages = python-packages: (toPythonApplication hy).override { # Example usage:
hyDefinedPythonPackages = python-packages; # hy.withPackages (ps: with ps; [ hyrule requests ])
}; withPackages = python-packages: python.withPackages (ps: (python-packages ps) ++ [ ps.hy ]);
}; };
meta = with lib; { meta = with lib; {

View file

@ -37169,7 +37169,7 @@ with pkgs;
simplenote = callPackage ../applications/misc/simplenote { }; simplenote = callPackage ../applications/misc/simplenote { };
hy = python3Packages.hy.withPackages (python-packages: [ ]); hy = with python3Packages; toPythonApplication hy;
wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { }; wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { };