diff --git a/pkgs/development/python-modules/plyara/default.nix b/pkgs/development/python-modules/plyara/default.nix index 3b03163a52dd..c6b3616286b0 100644 --- a/pkgs/development/python-modules/plyara/default.nix +++ b/pkgs/development/python-modules/plyara/default.nix @@ -2,9 +2,15 @@ lib, buildPythonPackage, pythonOlder, - fetchPypi, + fetchFromGitHub, setuptools, ply, + + pytestCheckHook, + pycodestyle, + pydocstyle, + pyflakes, + coverage, }: buildPythonPackage rec { @@ -14,9 +20,11 @@ buildPythonPackage rec { disabled = pythonOlder "3.10"; # https://github.com/plyara/plyara: "Plyara requires Python 3.10+" - src = fetchPypi { - inherit pname version; - hash = "sha256-zmpb5r3BcveLsQ0uIgQJx2vUaz2p/0PlO76E0e7elwA="; + src = fetchFromGitHub { + owner = "plyara"; + repo = "plyara"; + tag = "v${version}"; + hash = "sha256-WaQgqx003it+D0AGDxV6aSKO89F2iR9d8L4zvHyd0iQ="; }; build-system = [ @@ -31,11 +39,27 @@ buildPythonPackage rec { "plyara" ]; + nativeCheckInputs = [ + pytestCheckHook + pycodestyle + pydocstyle + pyflakes + coverage + ]; + + disabledTests = [ + # touches network + "test_third_party_repositories" + ]; + meta = { description = "Parse YARA rules"; - homepage = "https://pypi.org/project/plyara/"; + homepage = "https://github.com/plyara/plyara"; changelog = "https://github.com/plyara/plyara/releases/tag/v${version}"; license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ _13621 ]; + maintainers = with lib.maintainers; [ + _13621 + ivyfanchiang + ]; }; }