nixpkgs/pkgs/development/tools/build-managers/conan/default.nix

113 lines
3.2 KiB
Nix
Raw Normal View History

2021-04-06 23:30:48 +00:00
{ lib, stdenv, python3, fetchFromGitHub, git, pkg-config }:
2018-03-15 11:41:11 +00:00
# Note:
2020-05-06 16:15:07 +00:00
# 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.
2018-07-24 07:38:55 +00:00
let newPython = python3.override {
2018-03-15 11:41:11 +00:00
packageOverrides = self: super: {
node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec {
2019-01-09 13:29:56 +00:00
version = "0.6.1";
2018-03-15 11:41:11 +00:00
src = oldAttrs.src.override {
inherit version;
2019-01-09 13:29:56 +00:00
sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0";
2018-03-15 11:41:11 +00:00
};
});
# https://github.com/conan-io/conan/issues/8876
pyjwt = super.pyjwt.overridePythonAttrs (oldAttrs: rec {
version = "1.7.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96";
};
disabledTests = [
"test_ec_verify_should_return_false_if_signature_invalid"
];
});
# conan needs jinja2<3
jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec {
version = "2.11.3";
src = oldAttrs.src.override {
inherit version;
sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6";
};
});
# old jinja2 needs old markupsafe
markupsafe = super.markupsafe.overridePythonAttrs (oldAttrs: rec {
version = "1.1.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b";
};
});
2018-03-15 11:41:11 +00:00
};
};
in newPython.pkgs.buildPythonApplication rec {
2021-12-18 14:42:33 +00:00
version = "1.43.1";
2017-04-12 23:40:33 +00:00
pname = "conan";
src = fetchFromGitHub {
owner = "conan-io";
repo = "conan";
rev = version;
2021-12-18 14:42:33 +00:00
sha256 = "0jwi7smgy2d9m49igijqr2p4ncw5nksjbijj8fzjvf1lgxgnyjhr";
2018-07-24 07:38:55 +00:00
};
propagatedBuildInputs = with newPython.pkgs; [
2020-03-22 14:45:49 +00:00
bottle
colorama
python-dateutil
2020-03-22 14:45:49 +00:00
deprecation
distro
fasteners
future
jinja2
2020-03-22 14:45:49 +00:00
node-semver
patch-ng
2020-03-22 14:45:49 +00:00
pluginbase
pygments
pyjwt
pylint # Not in `requirements.txt` but used in hooks, see https://github.com/conan-io/conan/pull/6152
2020-03-22 14:45:49 +00:00
pyyaml
requests
six
tqdm
urllib3
2021-02-27 04:20:00 +00:00
] ++ lib.optionals stdenv.isDarwin [ idna cryptography pyopenssl ];
2018-07-24 07:38:55 +00:00
checkInputs = [
pkg-config
2018-07-24 07:38:55 +00:00
git
] ++ (with newPython.pkgs; [
2019-01-09 13:29:56 +00:00
codecov
mock
2018-03-15 11:41:11 +00:00
nose
parameterized
webtest
2018-07-24 07:38:55 +00:00
]);
2018-03-15 11:41:11 +00:00
# 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;
2017-04-12 23:40:33 +00:00
postPatch = ''
substituteInPlace conans/requirements.txt --replace 'PyYAML>=3.11, <6.0' 'PyYAML>=3.11'
'';
2017-11-13 19:08:07 +00:00
meta = with lib; {
homepage = "https://conan.io";
2017-04-12 23:40:33 +00:00
description = "Decentralized and portable C/C++ package manager";
license = licenses.mit;
2019-01-09 13:29:56 +00:00
maintainers = with maintainers; [ HaoZeke ];
2017-04-12 23:40:33 +00:00
};
}