commit
0bc0823ff7
3 changed files with 62 additions and 26 deletions
22
pkgs/development/python-modules/patch-ng/default.nix
Normal file
22
pkgs/development/python-modules/patch-ng/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchurl
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
version = "1.17.2"; # note: `conan` package may require a hardcoded one
|
||||||
|
pname = "patch-ng";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "mirror://pypi/p/${pname}/${pname}-${version}.tar.gz";
|
||||||
|
sha256 = "02nadk70sk51liv0qav88kx8rzfdjc1x52023zayanz44kkcjl2i";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Library to parse and apply unified diffs.";
|
||||||
|
homepage = "https://github.com/conan-io/python-patch";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ HaoZeke ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,17 @@
|
||||||
{ lib, python3, git, pkgconfig }:
|
{ lib, python3, git, pkgconfig }:
|
||||||
|
|
||||||
|
# Note:
|
||||||
|
# Conan has specific dependency demanands; 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 {
|
let newPython = python3.override {
|
||||||
packageOverrides = self: super: {
|
packageOverrides = self: super: {
|
||||||
distro = super.distro.overridePythonAttrs (oldAttrs: rec {
|
distro = super.distro.overridePythonAttrs (oldAttrs: rec {
|
||||||
|
@ -16,20 +28,6 @@ let newPython = python3.override {
|
||||||
sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0";
|
sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
future = super.future.overridePythonAttrs (oldAttrs: rec {
|
|
||||||
version = "0.16.0";
|
|
||||||
src = oldAttrs.src.override {
|
|
||||||
inherit version;
|
|
||||||
sha256 = "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
tqdm = super.tqdm.overridePythonAttrs (oldAttrs: rec {
|
|
||||||
version = "4.28.1";
|
|
||||||
src = oldAttrs.src.override {
|
|
||||||
inherit version;
|
|
||||||
sha256 = "1fyybgbmlr8ms32j7h76hz5g9xc6nf0644mwhc40a0s5k14makav";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
pluginbase = super.pluginbase.overridePythonAttrs (oldAttrs: rec {
|
pluginbase = super.pluginbase.overridePythonAttrs (oldAttrs: rec {
|
||||||
version = "0.7";
|
version = "0.7";
|
||||||
src = oldAttrs.src.override {
|
src = oldAttrs.src.override {
|
||||||
|
@ -41,18 +39,34 @@ let newPython = python3.override {
|
||||||
};
|
};
|
||||||
|
|
||||||
in newPython.pkgs.buildPythonApplication rec {
|
in newPython.pkgs.buildPythonApplication rec {
|
||||||
version = "1.12.3";
|
version = "1.23.0";
|
||||||
pname = "conan";
|
pname = "conan";
|
||||||
|
|
||||||
src = newPython.pkgs.fetchPypi {
|
src = newPython.pkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "1cnfy9b57apps4bfai6r67g0mrvgnqa154z9idv0kf93k1nvx53g";
|
sha256 = "06jnmgvzdyxjpcmyj1804mlq6b842jvvbsngsamdy976sqws870g";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with newPython.pkgs; [
|
propagatedBuildInputs = with newPython.pkgs; [
|
||||||
colorama deprecation distro fasteners bottle
|
bottle
|
||||||
future node-semver patch pygments pluginbase
|
colorama
|
||||||
pyjwt pylint pyyaml requests six tqdm
|
dateutil
|
||||||
|
deprecation
|
||||||
|
distro
|
||||||
|
fasteners
|
||||||
|
future
|
||||||
|
jinja2
|
||||||
|
node-semver
|
||||||
|
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
|
||||||
|
six
|
||||||
|
tqdm
|
||||||
|
urllib3
|
||||||
];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
|
@ -68,15 +82,13 @@ in newPython.pkgs.buildPythonApplication rec {
|
||||||
webtest
|
webtest
|
||||||
]);
|
]);
|
||||||
|
|
||||||
checkPhase = ''
|
# Conan 1.14.0 has removed all tests from the Pypi source dist:
|
||||||
export HOME=$TMPDIR
|
# https://github.com/conan-io/conan/pull/4713
|
||||||
pytest conans/test/{utils,unittests} \
|
# We have recommended they be added back:
|
||||||
-k 'not SVN and not ToolsNetTest'
|
# https://github.com/conan-io/conan/issues/4563#issuecomment-602225083
|
||||||
'';
|
doCheck = false;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace conans/requirements_server.txt \
|
|
||||||
--replace "pluginbase>=0.5, < 1.0" "pluginbase>=0.5"
|
|
||||||
substituteInPlace conans/requirements.txt \
|
substituteInPlace conans/requirements.txt \
|
||||||
--replace "PyYAML>=3.11, <3.14.0" "PyYAML"
|
--replace "PyYAML>=3.11, <3.14.0" "PyYAML"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -4760,6 +4760,8 @@ in {
|
||||||
|
|
||||||
patch = callPackage ../development/python-modules/patch { };
|
patch = callPackage ../development/python-modules/patch { };
|
||||||
|
|
||||||
|
patch-ng = callPackage ../development/python-modules/patch-ng { };
|
||||||
|
|
||||||
pathos = callPackage ../development/python-modules/pathos { };
|
pathos = callPackage ../development/python-modules/pathos { };
|
||||||
|
|
||||||
patsy = callPackage ../development/python-modules/patsy { };
|
patsy = callPackage ../development/python-modules/patsy { };
|
||||||
|
|
Loading…
Reference in a new issue