about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/scim2-filter-parser/default.nix
blob: 9b140ae6fed5e2e9cc2b4fd1b42b9ff47cbf975d (plain) (blame)
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
52
53
54
55
56
57
58
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, django
, sly
, mock
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "scim2-filter-parser";
  version = "0.5.0";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "15five";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-QEPTYpWlRPWO6Evyt4zoqUST4ousF67GmiOpD7WUqcI=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace "poetry.masonry.api" "poetry.core.masonry.api"
  '';

  propagatedBuildInputs = [
    sly
  ];

  passthru.optional-dependencies = {
    django-query = [
      django
    ];
  };

  pythonImportsCheck = [
    "scim2_filter_parser"
  ];

  nativeCheckInputs = [
    mock
    pytestCheckHook
  ] ++ passthru.optional-dependencies.django-query;

  meta = with lib; {
    description = "A customizable parser/transpiler for SCIM2.0 filters";
    homepage = "https://github.com/15five/scim2-filter-parser";
    changelog = "https://github.com/15five/scim2-filter-parser/blob/${version}/CHANGELOG.rst";
    license = licenses.mit;
    maintainers = with maintainers; [ s1341 ];
  };
}