diff --git a/pkgs/development/python-modules/ansi/default.nix b/pkgs/development/python-modules/ansi/default.nix new file mode 100644 index 000000000000..a79de55d2eb0 --- /dev/null +++ b/pkgs/development/python-modules/ansi/default.nix @@ -0,0 +1,15 @@ +{ buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "ansi"; + version = "0.1.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "06y6470bzvlqys3zi2vc68rmk9n05v1ibral14gbfpgfa8fzy7pg"; + }; + + checkPhase = '' + python -c "import ansi.color" + ''; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 80fbc3d544c3..6a9c2ff5716e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -22840,15 +22840,7 @@ EOF doCheck = false; }; - ansi = buildPythonPackage rec { - name = "ansi-${version}"; - version = "0.1.3"; - - src = pkgs.fetchurl { - url = "mirror://pypi/a/ansi/${name}.tar.gz"; - sha256 = "06y6470bzvlqys3zi2vc68rmk9n05v1ibral14gbfpgfa8fzy7pg"; - }; - }; + ansi = callPackage ../development/python-modules/ansi { }; pygments-markdown-lexer = buildPythonPackage rec { name = "pygments-markdown-lexer-${version}";