nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 opentelemetry-api,
7 opentelemetry-sdk,
8 pytest-asyncio,
9 pytest-mock,
10 pytestCheckHook,
11 std-uritemplate,
12 gitUpdater,
13}:
14
15buildPythonPackage rec {
16 pname = "microsoft-kiota-abstractions";
17 version = "1.9.8";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "microsoft";
22 repo = "kiota-python";
23 tag = "microsoft-kiota-abstractions-v${version}";
24 hash = "sha256-05/I06p3zBc/Kb7H8dMEbUxFr0dOXSSBuIyEGZ4twhA=";
25 };
26
27 sourceRoot = "${src.name}/packages/abstractions/";
28
29 build-system = [ poetry-core ];
30
31 dependencies = [
32 opentelemetry-api
33 opentelemetry-sdk
34 std-uritemplate
35 ];
36
37 nativeCheckInputs = [
38 pytest-asyncio
39 pytest-mock
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # ValueError: Illegal class passed as substitution, found <class 'datetime.datetime'> at col: 39
45 "test_sets_datetime_values_in_path_parameters"
46 ];
47
48 pythonImportsCheck = [ "kiota_abstractions" ];
49
50 # detects the wrong tag on the repo
51 passthru.skipBulkUpdate = true;
52
53 passthru.updateScript = gitUpdater {
54 rev-prefix = "microsoft-kiota-abstractions-v";
55 };
56
57 meta = {
58 description = "Abstractions library for Kiota generated Python clients";
59 homepage = "https://github.com/microsoft/kiota-python/tree/main/packages/abstractions/";
60 changelog = "https://github.com/microsoft/kiota-python/releases/tag/${src.tag}";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [ fab ];
63 };
64}