summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-fluent/fluent-pygments.nix
blob: 141e13c1d5c41b1498b25751c8089029375b3c55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  pytestCheckHook,
  setuptools,

  # dependencies
  fluent-syntax,
  pygments,
  six,
}:

let
  version = "1.0";

  src = fetchFromGitHub {
    owner = "projectfluent";
    repo = "python-fluent";
    rev = "fluent.pygments@${version}";
    hash = "sha256-AR2uce3HS1ELzpoHmx7F/5/nrL+7KhYemw/00nmvLik=";
  };
in
buildPythonPackage {
  pname = "fluent-pygments";
  inherit version;
  pyproject = true;

  inherit src;
  sourceRoot = "${src.name}/fluent.pygments";

  build-system = [ setuptools ];

  dependencies = [
    fluent-syntax
    pygments
    six
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "fluent.pygments" ];

  meta = {
    changelog = "https://github.com/projectfluent/python-fluent/blob/main/fluent.pygments/CHANGELOG.rst";
    description = "Plugin for pygments to add syntax highlighting of Fluent files in Sphinx";
    homepage = "https://projectfluent.org/python-fluent/fluent.pygments/${version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ getpsyched ];
  };
}