2021-02-27 04:20:00 +00:00
|
|
|
{ lib, stdenv, python3, fetchFromGitHub, git, pkg-config, fetchpatch }:
|
2018-03-15 11:41:11 +00:00
|
|
|
|
2020-03-22 15:34:55 +00:00
|
|
|
# Note:
|
2020-05-06 17:15:07 +01:00
|
|
|
# Conan has specific dependency demands; check
|
2020-03-22 15:34:55 +00:00
|
|
|
# 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 08:38:55 +01:00
|
|
|
let newPython = python3.override {
|
2018-03-15 11:41:11 +00:00
|
|
|
packageOverrides = self: super: {
|
|
|
|
distro = super.distro.overridePythonAttrs (oldAttrs: rec {
|
2019-01-16 12:23:10 +00:00
|
|
|
version = "1.1.0";
|
2018-03-15 11:41:11 +00:00
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "1vn1db2akw98ybnpns92qi11v94hydwp130s8753k6ikby95883j";
|
|
|
|
};
|
2021-02-27 04:20:00 +00:00
|
|
|
patches = oldAttrs.patches or [] ++ [
|
|
|
|
# Don't raise import error on non-linux os. Remove after upgrading to distro≥1.2.0
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/nir0s/distro/commit/25aa3f8c5934346dc838387fc081ce81baddeb95.patch";
|
|
|
|
sha256 = "0m09ldf75gacazh2kr04cifgsqfxg670vk4ypl62zv7fp3nyd5dc";
|
|
|
|
})
|
|
|
|
];
|
2018-03-15 11:41:11 +00:00
|
|
|
});
|
|
|
|
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
|
|
|
};
|
|
|
|
});
|
2019-04-03 14:54:19 +01:00
|
|
|
pluginbase = super.pluginbase.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.7";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8";
|
|
|
|
};
|
|
|
|
});
|
2018-03-15 11:41:11 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in newPython.pkgs.buildPythonApplication rec {
|
2020-07-01 20:11:14 +01:00
|
|
|
version = "1.27.0";
|
2017-04-13 00:40:33 +01:00
|
|
|
pname = "conan";
|
|
|
|
|
2020-07-01 20:11:14 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "conan-io";
|
|
|
|
repo = "conan";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0ncqs1p4g23fmzgdmwppgxr8w275h38hgjdzs456cgivz8xs9rjl";
|
2018-07-24 08:38:55 +01:00
|
|
|
};
|
2019-11-18 16:37:24 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = with newPython.pkgs; [
|
2020-03-22 14:45:49 +00:00
|
|
|
bottle
|
|
|
|
colorama
|
2020-03-22 15:34:55 +00:00
|
|
|
dateutil
|
2020-03-22 14:45:49 +00:00
|
|
|
deprecation
|
|
|
|
distro
|
|
|
|
fasteners
|
|
|
|
future
|
2020-03-22 15:34:55 +00:00
|
|
|
jinja2
|
2020-03-22 14:45:49 +00:00
|
|
|
node-semver
|
2020-03-22 15:34:55 +00:00
|
|
|
patch-ng
|
2020-03-22 14:45:49 +00:00
|
|
|
pluginbase
|
|
|
|
pygments
|
|
|
|
pyjwt
|
2020-03-22 15:34:55 +00:00
|
|
|
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
|
2020-03-22 15:34:55 +00:00
|
|
|
urllib3
|
2021-02-27 04:20:00 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [ idna cryptography pyopenssl ];
|
2019-11-18 16:37:24 +00:00
|
|
|
|
2018-07-24 08:38:55 +01:00
|
|
|
checkInputs = [
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2018-07-24 08:38:55 +01: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 08:38:55 +01:00
|
|
|
]);
|
2018-03-15 11:41:11 +00:00
|
|
|
|
2020-07-01 20:11:14 +01: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
|
2020-03-22 15:34:55 +00:00
|
|
|
doCheck = false;
|
2017-04-13 00:40:33 +01:00
|
|
|
|
2019-03-23 18:18:41 +00:00
|
|
|
postPatch = ''
|
2019-11-18 16:37:24 +00:00
|
|
|
substituteInPlace conans/requirements.txt \
|
2020-05-06 17:14:13 +01:00
|
|
|
--replace "PyYAML>=3.11, <3.14.0" "PyYAML" \
|
2020-07-01 20:09:04 +01:00
|
|
|
--replace "deprecation>=2.0, <2.1" "deprecation" \
|
2021-02-27 04:20:00 +00:00
|
|
|
--replace "idna==2.6" "idna" \
|
|
|
|
--replace "cryptography>=1.3.4, <2.4.0" "cryptography" \
|
|
|
|
--replace "pyOpenSSL>=16.0.0, <19.0.0" "pyOpenSSL" \
|
2020-07-01 20:09:04 +01:00
|
|
|
--replace "six>=1.10.0,<=1.14.0" "six"
|
2019-03-23 18:18:41 +00:00
|
|
|
'';
|
|
|
|
|
2017-11-13 19:08:07 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://conan.io";
|
2017-04-13 00:40:33 +01: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-13 00:40:33 +01:00
|
|
|
};
|
|
|
|
}
|