1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# build-system
6, poetry-core
7
8# propagates
9, django
10, scim2-filter-parser
11
12# tests
13, mock
14, pytest-django
15, pytestCheckHook
16}:
17
18buildPythonPackage rec {
19 pname = "django-scim2";
20 version = "0.19.0";
21 format = "pyproject";
22
23 src = fetchFromGitHub {
24 owner = "15five";
25 repo = pname;
26 rev = "refs/tags/${version}";
27 hash = "sha256-larDh4f9/xVr11/n/WfkJ2Tx45DMQqyK3ZzkWAvzeig=";
28 };
29
30 # remove this when upstream releases a new version > 0.19.0
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace "poetry>=0.12" "poetry-core>=1.5.2" \
34 --replace "poetry.masonry.api" "poetry.core.masonry.api"
35 '';
36
37 nativeBuildInputs = [
38 poetry-core
39 ];
40
41 propagatedBuildInputs = [
42 django
43 scim2-filter-parser
44 ];
45
46 pythonImportsCheck = [
47 "django_scim"
48 ];
49
50 nativeCheckInputs = [
51 mock
52 pytest-django
53 pytestCheckHook
54 ];
55
56 meta = with lib; {
57 changelog = "https://github.com/15five/django-scim2/blob/${src.rev}/CHANGES.txt";
58 description = "A SCIM 2.0 Service Provider Implementation (for Django)";
59 homepage = "https://github.com/15five/django-scim2";
60 license = licenses.mit;
61 maintainers = with maintainers; [ s1341 ];
62 };
63}