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