summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-02-24 21:38:15 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2023-02-24 21:38:15 +0100
commit7ce7852e0f53e5882e52722be8b2b9b4409b5711 (patch)
tree53ee5285653ff2dd04b0d3c48831f3f6e02c217e /pkgs/development/tools/build-managers
parent1e21c5807c4010c84c4628aab2af38a45c46c575 (diff)
downloadnixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.tar
nixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.tar.gz
nixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.tar.bz2
nixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.tar.lz
nixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.tar.xz
nixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.tar.zst
nixpkgs-7ce7852e0f53e5882e52722be8b2b9b4409b5711.zip
conan: 1.53.0 -> 2.0.0
Diff: conan-io/conan@refs/tags/1.53.0...2.0.0

Changelog: https://github.com/conan-io/conan/releases/tag/2.0.0
Diffstat (limited to 'pkgs/development/tools/build-managers')
-rw-r--r--pkgs/development/tools/build-managers/conan/default.nix91
1 files changed, 39 insertions, 52 deletions
diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix
index 471d27e5042..cb66df77e31 100644
--- a/pkgs/development/tools/build-managers/conan/default.nix
+++ b/pkgs/development/tools/build-managers/conan/default.nix
@@ -1,68 +1,31 @@
 { lib
 , stdenv
-, python3
 , fetchFromGitHub
 , git
 , pkg-config
+, python3
+, zlib
 }:
 
-# Note:
-# Conan has specific dependency demands; check
-#     https://github.com/conan-io/conan/blob/master/conans/requirements.txt
-#     https://github.com/conan-io/conan/blob/master/conans/requirements_server.txt
-# on the release branch/commit we're packaging.
-#
-# Two approaches are used here to deal with that:
-# Pinning the specific versions it wants in `newPython`,
-# and using `substituteInPlace conans/requirements.txt ...`
-# in `postPatch` to allow newer versions when we know
-# (e.g. from changelogs) that they are compatible.
-
-let newPython = python3.override {
-  packageOverrides = self: super: {
-    node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec {
-      version = "0.6.1";
-      src = oldAttrs.src.override {
-        inherit version;
-        sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0";
-      };
-    });
-    distro = super.distro.overridePythonAttrs (oldAttrs: rec {
-      version = "1.5.0";
-      src = oldAttrs.src.override {
-        inherit version;
-        hash = "sha256-Dlh1auOPvY/DAg1UutuOrhfFudy+04ixe7Vbilko35I=";
-      };
-    });
-  };
-};
-
-in newPython.pkgs.buildPythonApplication rec {
+python3.pkgs.buildPythonApplication rec {
   pname = "conan";
-  version = "1.53.0";
+  version = "2.0.0";
+  format = "setuptools";
 
   src = fetchFromGitHub {
     owner = "conan-io";
     repo = "conan";
     rev = "refs/tags/${version}";
-    hash = "sha256-2DNDNdZO1D30egOiYa3qw8F2xsUTBOm/CHv07v5OrC8=";
+    hash = "sha256-yx/MO5QAVKnGraQXJitXxaZooLtBqa+L04s73DwiE14=";
   };
 
-  postPatch = ''
-    substituteInPlace conans/requirements.txt \
-      --replace 'PyYAML>=3.11, <6.0' 'PyYAML>=3.11'
-  '';
-
-  propagatedBuildInputs = with newPython.pkgs; [
+  propagatedBuildInputs = with python3.pkgs; [
     bottle
     colorama
     python-dateutil
-    deprecation
     distro
     fasteners
-    future
     jinja2
-    node-semver
     patch-ng
     pluginbase
     pygments
@@ -70,7 +33,6 @@ in newPython.pkgs.buildPythonApplication rec {
     pylint # Not in `requirements.txt` but used in hooks, see https://github.com/conan-io/conan/pull/6152
     pyyaml
     requests
-    six
     tqdm
     urllib3
   ] ++ lib.optionals stdenv.isDarwin [
@@ -80,19 +42,44 @@ in newPython.pkgs.buildPythonApplication rec {
   ];
 
   nativeCheckInputs = [
-    pkg-config
     git
-  ] ++ (with newPython.pkgs; [
-    codecov
+    pkg-config
+    zlib
+  ] ++ (with python3.pkgs; [
     mock
-    nose
     parameterized
+    pytest-xdist
+    pytestCheckHook
     webtest
   ]);
 
-  # TODO: reenable tests now that we fetch tests w/ the source from GitHub.
-  # Not enabled right now due to time constraints/failing tests that I didn't have time to track down
-  doCheck = false;
+  pythonImportsCheck = [
+    "conan"
+  ];
+
+  pytestFlagsArray = [
+    "-n"
+    "$NIX_BUILD_CORES"
+  ];
+
+  disabledTests = [
+    # Tests require network access
+    "TestFTP"
+  ];
+
+  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/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/system/package_manager_test.py"
+    "conans/test/functional/util/test_cmd_args_to_string.py"
+    "conans/test/unittests/tools/env/test_env_files.py"
+  ];
 
   meta = with lib; {
     description = "Decentralized and portable C/C++ package manager";