nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 argcomplete,
4 buildPythonPackage,
5 fetchPypi,
6 gql,
7 pyyaml,
8 requests-toolbelt,
9 requests,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "python-gitlab";
15 version = "7.1.0";
16 pyproject = true;
17
18 src = fetchPypi {
19 pname = "python_gitlab";
20 inherit version;
21 hash = "sha256-HDTaPeQK0hZ114gTb3PSCmBklRPmkvUsWpcgQ025fEY=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [
27 requests
28 requests-toolbelt
29 ];
30
31 optional-dependencies = {
32 autocompletion = [ argcomplete ];
33 graphql = [ gql ] ++ gql.optional-dependencies.httpx;
34 yaml = [ pyyaml ];
35 };
36
37 # Tests rely on a gitlab instance on a local docker setup
38 doCheck = false;
39
40 pythonImportsCheck = [ "gitlab" ];
41
42 meta = {
43 description = "Interact with GitLab API";
44 homepage = "https://github.com/python-gitlab/python-gitlab";
45 changelog = "https://github.com/python-gitlab/python-gitlab/blob/v${version}/CHANGELOG.md";
46 license = lib.licenses.lgpl3Only;
47 maintainers = with lib.maintainers; [ nyanloutre ];
48 mainProgram = "gitlab";
49 };
50}