Merge pull request #171432 from thiagokokada/bump-hy-and-unify
python3Packages.hy: 1.0a3 -> 1.0a4; hy: replace it with python3Packages.hy; hyrule: init at 0.1
This commit is contained in:
commit
bfd06fd04d
6 changed files with 80 additions and 65 deletions
|
@ -1,40 +0,0 @@
|
||||||
{ lib
|
|
||||||
, python3Packages
|
|
||||||
, hyDefinedPythonPackages /* Packages like with python.withPackages */
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
python3Packages.buildPythonApplication rec {
|
|
||||||
pname = "hy";
|
|
||||||
version = "1.0a1";
|
|
||||||
|
|
||||||
src = python3Packages.fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-lCrbvbkeutSNmvvn/eHpTnJwPb5aEH7hWTXYSE+AJmU=";
|
|
||||||
};
|
|
||||||
|
|
||||||
checkInputs = with python3Packages; [ flake8 pytest ];
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [
|
|
||||||
appdirs
|
|
||||||
astor
|
|
||||||
clint
|
|
||||||
colorama
|
|
||||||
fastentrypoints
|
|
||||||
funcparserlib
|
|
||||||
rply
|
|
||||||
pygments
|
|
||||||
] ++ (hyDefinedPythonPackages python3Packages);
|
|
||||||
|
|
||||||
# Hy does not include tests in the source distribution from PyPI, so only test executable.
|
|
||||||
checkPhase = ''
|
|
||||||
$out/bin/hy --help > /dev/null
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A LISP dialect embedded in Python";
|
|
||||||
homepage = "https://hylang.org/";
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = with maintainers; [ nixy mazurel ];
|
|
||||||
platforms = platforms.all;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
{ lib
|
|
||||||
, callPackage
|
|
||||||
, hyDefinedPythonPackages ? python-packages: [] /* Packages like with python.withPackages */
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
withPackages = (
|
|
||||||
python-packages: callPackage ./builder.nix {
|
|
||||||
hyDefinedPythonPackages = python-packages;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
in
|
|
||||||
(withPackages hyDefinedPythonPackages) // {
|
|
||||||
# Export withPackages function for hy customization
|
|
||||||
inherit withPackages;
|
|
||||||
}
|
|
|
@ -4,31 +4,44 @@
|
||||||
, colorama
|
, colorama
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, funcparserlib
|
, funcparserlib
|
||||||
|
, hy
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, python
|
||||||
, pythonOlder
|
, pythonOlder
|
||||||
, rply
|
, rply
|
||||||
|
, testers
|
||||||
|
, toPythonApplication
|
||||||
|
, hyDefinedPythonPackages ? python-packages: [ ] /* Packages like with python.withPackages */
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "hy";
|
pname = "hy";
|
||||||
version = "1.0a3";
|
version = "1.0a4";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hylang";
|
owner = "hylang";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
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 = [
|
propagatedBuildInputs = [
|
||||||
colorama
|
colorama
|
||||||
funcparserlib
|
funcparserlib
|
||||||
rply
|
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
|
||||||
|
@ -43,10 +56,22 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
pythonImportsCheck = [ "hy" ];
|
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; {
|
meta = with lib; {
|
||||||
description = "Python to/from Lisp layer";
|
description = "A LISP dialect embedded in Python";
|
||||||
homepage = "https://github.com/hylang/hy";
|
homepage = "https://hylang.org/";
|
||||||
|
changelog = "https://github.com/hylang/hy/releases/tag/${version}";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ fab ];
|
maintainers = with maintainers; [ fab mazurel nixy thiagokokada ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
43
pkgs/development/python-modules/hyrule/default.nix
Normal file
43
pkgs/development/python-modules/hyrule/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, hy
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "hyrule";
|
||||||
|
version = "0.1";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "hylang";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-sqS5vOcbln+Vfv/Ji/8rJ4GTQpXIuhgf+MukjV0Kkuw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
hy
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
# Some tests depends on hy on PATH
|
||||||
|
preCheck = "PATH=${hy}/bin:$PATH";
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "hyrule" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Hyrule is a utility library for the Hy programming language";
|
||||||
|
homepage = "https://github.com/hylang/hyrule";
|
||||||
|
changelog = "https://github.com/hylang/hylure/releases/tag/${version}";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ thiagokokada ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -35058,7 +35058,7 @@ with pkgs;
|
||||||
|
|
||||||
simplenote = callPackage ../applications/misc/simplenote { };
|
simplenote = callPackage ../applications/misc/simplenote { };
|
||||||
|
|
||||||
hy = callPackage ../development/interpreters/hy {};
|
hy = python3Packages.hy.withPackages (python-packages: [ ]);
|
||||||
|
|
||||||
wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { };
|
wmic-bin = callPackage ../servers/monitoring/plugins/wmic-bin.nix { };
|
||||||
|
|
||||||
|
|
|
@ -4002,6 +4002,8 @@ in {
|
||||||
|
|
||||||
hyppo = callPackage ../development/python-modules/hyppo { };
|
hyppo = callPackage ../development/python-modules/hyppo { };
|
||||||
|
|
||||||
|
hyrule = callPackage ../development/python-modules/hyrule { };
|
||||||
|
|
||||||
i2c-tools = callPackage ../development/python-modules/i2c-tools {
|
i2c-tools = callPackage ../development/python-modules/i2c-tools {
|
||||||
inherit (pkgs) i2c-tools;
|
inherit (pkgs) i2c-tools;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue