From 535ae9d44ead71cf362122e341485eb48238d3eb Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sun, 7 Jun 2020 11:25:20 +0200 Subject: [PATCH] python.pkgs.pygments: fixup --- .../python-modules/Pygments/2_5.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/Pygments/2_5.nix diff --git a/pkgs/development/python-modules/Pygments/2_5.nix b/pkgs/development/python-modules/Pygments/2_5.nix new file mode 100644 index 000000000000..a0c40550c9a9 --- /dev/null +++ b/pkgs/development/python-modules/Pygments/2_5.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchPypi +, docutils +}: + +buildPythonPackage rec { + pname = "Pygments"; + version = "2.5.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"; + }; + + propagatedBuildInputs = [ docutils ]; + + # Circular dependency with sphinx + doCheck = false; + + meta = { + homepage = "https://pygments.org/"; + description = "A generic syntax highlighter"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4b1d0ff01fc6..d6b46fa9e76a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5267,7 +5267,10 @@ in { pyglet = callPackage ../development/python-modules/pyglet {}; - pygments = callPackage ../development/python-modules/Pygments { }; + pygments = if isPy3k then + callPackage ../development/python-modules/Pygments { } + else + callPackage ../development/python-modules/Pygments/2_5.nix { }; pygpgme = callPackage ../development/python-modules/pygpgme { };