From 6f60530fa681ac62e8305f1008465c45acf97dd9 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 4 Jun 2021 04:20:00 +0000 Subject: [PATCH] python38Packages.pglast: 1.17 -> 3.0 --- .../python-modules/pglast/default.nix | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/pglast/default.nix b/pkgs/development/python-modules/pglast/default.nix index 3240b080992..6a0f8940788 100644 --- a/pkgs/development/python-modules/pglast/default.nix +++ b/pkgs/development/python-modules/pglast/default.nix @@ -1,29 +1,33 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , isPy3k -, pythonOlder , setuptools -, aenum -, pytest , pytestcov +, pytest }: buildPythonPackage rec { pname = "pglast"; - version = "1.17"; + version = "3.0"; - src = fetchPypi { - inherit pname version; - sha256 = "2979b38ca5f72cfa0a5db78af2f62d04db6a7647ee7f03eac7a67f9e86e3f5f9"; + # PyPI tarball does not include all the required files + src = fetchFromGitHub { + owner = "lelit"; + repo = pname; + rev = "v${version}"; + fetchSubmodules = true; + sha256 = "0yi24wj19rzw5dvppm8g3hnfskyzbrqw14q8x9f2q5zi8g6xnnrd"; }; disabled = !isPy3k; - propagatedBuildInputs = [ setuptools ] ++ lib.optionals (pythonOlder "3.6") [ aenum ]; + propagatedBuildInputs = [ setuptools ]; checkInputs = [ pytest pytestcov ]; + pythonImportsCheck = [ "pglast" ]; + checkPhase = '' pytest ''; @@ -31,6 +35,7 @@ buildPythonPackage rec { meta = with lib; { homepage = "https://github.com/lelit/pglast"; description = "PostgreSQL Languages AST and statements prettifier"; + changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst"; license = licenses.gpl3Plus; maintainers = [ maintainers.marsam ]; };