summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/co/conan/package.nix
blob: 3a3d61e463254c6f642d47bdecb2e51393ca5354 (plain)
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
  lib,
  stdenv,
  cmake,
  fetchFromGitHub,
  git,
  pkg-config,
  python3Packages,
  xcbuild,
  zlib,
}:

python3Packages.buildPythonApplication (finalAttrs: {
  pname = "conan";
  version = "2.32.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "conan-io";
    repo = "conan";
    tag = finalAttrs.version;
    hash = "sha256-UTwJ5UdniDWt0oX6Wy2NeNnAZ08XUd4qMSTm4/ZMXPM=";
  };

  pythonRelaxDeps = [
    "distro"
    "patch-ng"
    "urllib3"
  ];

  build-system = with python3Packages; [ setuptools ];

  dependencies =
    with python3Packages;
    [
      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.hostPlatform.isDarwin [
      idna
      cryptography
      pyopenssl
    ];

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

  dontUseCmakeConfigure = true;

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [ "conan" ];

  disabledTests = [
    # Tests require network access
    "TestFTP"
    # Unstable test
    "test_shared_windows_find_libraries"
    # 'cmake' tool version 'Any' is not available
    "test_build"
    "test_conan_new"
    "test_conan_new_compiles"
    # 'clang' tool chains
    "test_detect_clang_gcc_toolchain"
  ]
  ++ lib.optionals stdenv.hostPlatform.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"
    # Requires gcc to run
    "test_qbsprofile_rcflags"
  ];

  disabledTestPaths = [
    # Requires cmake, meson, autotools, apt-get, etc.
    "test/functional/command/runner_test.py"
    "test/functional/command/test_install_deploy.py"
    "test/functional/command/test_new.py"
    "test/functional/layout/test_editable_cmake.py"
    "test/functional/layout/test_editable_cmake_components.py"
    "test/functional/layout/test_in_subfolder.py"
    "test/functional/layout/test_source_folder.py"
    "test/functional/test_local_recipes_index.py"
    "test/functional/test_profile_detect_api.py"
    "test/functional/toolchains/"
    "test/functional/tools/scm/test_git.py"
    "test/functional/tools/system/package_manager_test.py"
    "test/functional/workspace/test_workspace.py"
    "test/functional/tools_versions_test.py"
    "test/functional/util/test_cmd_args_to_string.py"

    # Requires network access to PyPI
    "test/functional/tools/system/python_manager_test.py"

    # Test failure
    "test/unittests/tools/env/test_env_files.py"
  ];

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