Merge pull request #193124 from zhaofengli/fix-jsonschema-3-overrides
This commit is contained in:
commit
333d0ec1d3
|
@ -20,7 +20,9 @@ let
|
|||
});
|
||||
};
|
||||
commonOverrides = [
|
||||
(mkOverride "jsonschema" "3.2.0" "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68")
|
||||
(self: super: {
|
||||
jsonschema = super.jsonschema_3;
|
||||
})
|
||||
];
|
||||
};
|
||||
mkGui = args: libsForQt5.callPackage (import ./gui.nix (addVersion args // extraArgs)) { };
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
, python3
|
||||
, fetchFromGitHub
|
||||
, wrapQtAppsHook
|
||||
, packageOverrides ? self: super: {}
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -17,21 +18,7 @@ let
|
|||
];
|
||||
|
||||
python = python3.override {
|
||||
packageOverrides = lib.foldr lib.composeExtensions (self: super: {
|
||||
jsonschema = super.jsonschema.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "3.2.0";
|
||||
|
||||
src = super.fetchPypi {
|
||||
inherit (oldAttrs) pname;
|
||||
inherit version;
|
||||
sha256 = "sha256-yKhbKNN3zHc35G4tnytPRO48Dh3qxr9G3e/HGH0weXo=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
doCheck = false;
|
||||
});
|
||||
}) defaultOverrides;
|
||||
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ packageOverrides ] ++ defaultOverrides);
|
||||
};
|
||||
in python.pkgs.buildPythonPackage rec {
|
||||
pname = "gns3-gui";
|
||||
|
|
|
@ -14,22 +14,6 @@
|
|||
|
||||
let
|
||||
defaultOverrides = commonOverrides ++ [
|
||||
(self: super: {
|
||||
jsonschema = super.jsonschema.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "3.2.0";
|
||||
|
||||
src = super.fetchPypi {
|
||||
inherit (oldAttrs) pname;
|
||||
inherit version;
|
||||
sha256 = "sha256-yKhbKNN3zHc35G4tnytPRO48Dh3qxr9G3e/HGH0weXo=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
doCheck = false;
|
||||
});
|
||||
|
||||
})
|
||||
];
|
||||
|
||||
python = python3.override {
|
||||
|
|
|
@ -13,19 +13,7 @@ let
|
|||
packageOverrides = self: super: {
|
||||
# The bravado-core dependency is incompatible with jschonschema 4.0:
|
||||
# https://github.com/Yelp/bravado-core/pull/385
|
||||
jsonschema = super.jsonschema.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "3.2.0";
|
||||
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
hash = "sha256-yKhbKNN3zHc35G4tnytPRO48Dh3qxr9G3e/HGH0weXo=";
|
||||
sha256 = "";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
doCheck = false;
|
||||
});
|
||||
jsonschema = super.jsonschema_3;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
39
pkgs/development/python-modules/jsonschema/3_x.nix
Normal file
39
pkgs/development/python-modules/jsonschema/3_x.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ lib, buildPythonPackage, fetchPypi, isPy27
|
||||
, attrs
|
||||
, functools32
|
||||
, importlib-metadata
|
||||
, mock
|
||||
, nose
|
||||
, pyperf
|
||||
, pyrsistent
|
||||
, setuptools-scm
|
||||
, twisted
|
||||
, vcversioner
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "jsonschema";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
propagatedBuildInputs = [ attrs importlib-metadata functools32 pyrsistent ];
|
||||
checkInputs = [ nose mock pyperf twisted vcversioner ];
|
||||
|
||||
# zope namespace collides on py27
|
||||
doCheck = !isPy27;
|
||||
checkPhase = ''
|
||||
nosetests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/Julian/jsonschema";
|
||||
description = "An implementation of JSON Schema validation for Python";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ domenkozar ];
|
||||
};
|
||||
}
|
|
@ -4837,6 +4837,8 @@ in {
|
|||
|
||||
jsonschema = callPackage ../development/python-modules/jsonschema { };
|
||||
|
||||
jsonschema_3 = callPackage ../development/python-modules/jsonschema/3_x.nix { };
|
||||
|
||||
jsonstreams = callPackage ../development/python-modules/jsonstreams { };
|
||||
|
||||
json-tricks = callPackage ../development/python-modules/json-tricks { };
|
||||
|
|
Loading…
Reference in a new issue