about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/build-managers/conan/default.nix
blob: 7226d4e3340acaa9ca23a6b126d2c3630c85b4b9 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{ lib
, stdenv
, fetchFromGitHub
, git
, pkg-config
, xcbuild
, python3
, zlib
}:

python3.pkgs.buildPythonApplication rec {
  pname = "conan";
  version = "2.0.17";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "conan-io";
    repo = "conan";
    rev = "refs/tags/${version}";
    hash = "sha256-liCeGe0WBW+tOjW81cqrFUiOEWYhlqsBVgns6SxjPNM=";
  };

  nativeBuildInputs = with python3.pkgs; [
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = with python3.pkgs; [
    bottle
    colorama
    python-dateutil
    distro
    fasteners
    jinja2
    patch-ng
    pluginbase
    pygments
    pyjwt
    pylint # Not in `requirements.txt` but used in hooks, see https://github.com/conan-io/conan/pull/6152
    pyyaml
    requests
    tqdm
    urllib3
  ] ++ lib.optionals stdenv.isDarwin [
    idna
    cryptography
    pyopenssl
  ];

  nativeCheckInputs = [
    git
    pkg-config
    zlib
  ] ++ lib.optionals (stdenv.isDarwin) [
    xcbuild.xcrun
  ] ++ (with python3.pkgs; [
    mock
    parameterized
    pytest-xdist
    pytestCheckHook
    webtest
  ]);

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [
    "conan"
  ];

  pytestFlagsArray = [
    "-n"
    "$NIX_BUILD_CORES"
  ];

  disabledTests = [
    # Tests require network access
    "TestFTP"
  ] ++ lib.optionals stdenv.isDarwin [
    # Rejects paths containing nix
    "test_conditional_os"
    # Requires Apple Clang
    "test_detect_default_compilers"
    "test_detect_default_in_mac_os_using_gcc_as_default"
    # Incompatible with darwin.xattr and xcbuild from nixpkgs
    "test_dot_files"
    "test_xcrun"
    "test_xcrun_in_required_by_tool_requires"
    "test_xcrun_in_tool_requires"
  ];

  disabledTestPaths = [
    # Requires cmake, meson, autotools, apt-get, etc.
    "conans/test/functional/command/new_test.py"
    "conans/test/functional/command/test_install_deploy.py"
    "conans/test/functional/graph/test_transitive_build_scripts.py"
    "conans/test/functional/layout/test_editable_cmake_components.py"
    "conans/test/functional/layout/test_editable_cmake.py"
    "conans/test/functional/layout/test_in_subfolder.py"
    "conans/test/functional/layout/test_source_folder.py"
    "conans/test/functional/toolchains/"
    "conans/test/functional/tools_versions_test.py"
    "conans/test/functional/tools/scm/test_git.py"
    "conans/test/functional/tools/system/package_manager_test.py"
    "conans/test/functional/util/test_cmd_args_to_string.py"
    "conans/test/integration/command_v2/list_test.py"
    "conans/test/unittests/tools/env/test_env_files.py"
  ];

  meta = with lib; {
    description = "Decentralized and portable C/C++ package manager";
    homepage = "https://conan.io";
    changelog = "https://github.com/conan-io/conan/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ HaoZeke ];
  };
}