diff options
-rw-r--r-- | pkgs/development/python-modules/prance/default.nix | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/prance/default.nix b/pkgs/development/python-modules/prance/default.nix index cefa13610081f..1065781cde18a 100644 --- a/pkgs/development/python-modules/prance/default.nix +++ b/pkgs/development/python-modules/prance/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , chardet , requests , ruamel-yaml @@ -21,9 +22,29 @@ buildPythonPackage rec { repo = pname; rev = "v${version}"; fetchSubmodules = true; - sha256 = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ="; + hash = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ="; }; + patches = [ + # Fix for openapi-spec-validator 0.5.0+: + # https://github.com/RonnyPfannschmidt/prance/pull/132 + (fetchpatch { + name = "1-openapi-spec-validator-upgrade.patch"; + url = "https://github.com/RonnyPfannschmidt/prance/commit/55503c9b12b685863c932ededac996369e7d288a.patch"; + hash = "sha256-7SOgFsk2aaaaAYS8WJ9axqQFyEprurn6Zn12NcdQ9Bg="; + }) + (fetchpatch { + name = "2-openapi-spec-validator-upgrade.patch"; + url = "https://github.com/RonnyPfannschmidt/prance/commit/7e59cc69c6c62fd04875105773d9d220bb58fea6.patch"; + hash = "sha256-j6vmY3NqDswp7v9682H+/MxMGtFObMxUeL9Wbiv9hYw="; + }) + (fetchpatch { + name = "3-openapi-spec-validator-upgrade.patch"; + url = "https://github.com/RonnyPfannschmidt/prance/commit/7e575781d83845d7ea0c2eff57644df9b465c7af.patch"; + hash = "sha256-rexKoQ+TH3QmP20c3bA+7BLMLc+fkVhn7xsq+gle1Aw="; + }) + ]; + postPatch = '' substituteInPlace setup.cfg \ --replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" \ |