From 822608398927b2e5a849abc0d28d6a74afeefed2 Mon Sep 17 00:00:00 2001 From: nicoo Date: Tue, 29 Aug 2023 20:10:38 +0000 Subject: [PATCH] pythonPackages.pysimplesoap: simplify using `fetchDebianPatch` This can serve as both a first example, and confirmation the fetcher works. --- .../python-modules/pysimplesoap/default.nix | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/pysimplesoap/default.nix b/pkgs/development/python-modules/pysimplesoap/default.nix index 11ffdaa7aa58..b9b0bf506b8b 100644 --- a/pkgs/development/python-modules/pysimplesoap/default.nix +++ b/pkgs/development/python-modules/pysimplesoap/default.nix @@ -1,5 +1,5 @@ { lib -, fetchpatch +, fetchDebianPatch , fetchPypi , buildPythonPackage , m2crypto @@ -20,28 +20,24 @@ buildPythonPackage rec { m2crypto ]; - patches = - let - debianRevision = "5"; # The Debian package revision we get patches from - fetchDebianPatch = { name, hash }: fetchpatch { - url = "https://salsa.debian.org/python-team/packages/pysimplesoap/-/raw/debian/${version}-${debianRevision}/debian/patches/${name}.patch"; - inherit hash; - }; - in map fetchDebianPatch [ - # Merged upstream: f5f96210e1483f81cb5c582a6619e3ec4b473027 - { name = "Add-quotes-to-SOAPAction-header-in-SoapClient"; - hash = "sha256-xA8Wnrpr31H8wy3zHSNfezFNjUJt1HbSXn3qUMzeKc0="; } - # Merged upstream: ad03a21cafab982eed321553c4bfcda1755182eb - { name = "fix-httplib2-version-check"; - hash = "sha256-zUeF3v0N/eMyRVRH3tQLfuUfMKOD/B/aqEwFh/7HxH4="; } - { name = "reorder-type-check-to-avoid-a-TypeError"; - hash = "sha256-2p5Cqvh0SPfJ8B38wb/xq7jWGYgpI9pavA6qkMUb6hA="; } - # Merged upstream: 033e5899e131a2c1bdf7db5852f816f42aac9227 - { name = "Support-integer-values-in-maxOccurs-attribute"; - hash = "sha256-IZ0DP7io+ihcnB5547cR53FAdnpRLR6z4J5KsNrkfaI="; } - { name = "PR204"; - hash = "sha256-JlxeTnKDFxvEMFBthZsaYRbNOoBvLJhBnXCRoiL/nVw="; } - ] ++ [ ./stringIO.patch ]; + patches = map (args: fetchDebianPatch ({ + inherit pname version; + debianRevision = "5"; + } // args)) [ + # Merged upstream: f5f96210e1483f81cb5c582a6619e3ec4b473027 + { name = "Add-quotes-to-SOAPAction-header-in-SoapClient"; + hash = "sha256-xA8Wnrpr31H8wy3zHSNfezFNjUJt1HbSXn3qUMzeKc0="; } + # Merged upstream: ad03a21cafab982eed321553c4bfcda1755182eb + { name = "fix-httplib2-version-check"; + hash = "sha256-zUeF3v0N/eMyRVRH3tQLfuUfMKOD/B/aqEwFh/7HxH4="; } + { name = "reorder-type-check-to-avoid-a-TypeError"; + hash = "sha256-2p5Cqvh0SPfJ8B38wb/xq7jWGYgpI9pavA6qkMUb6hA="; } + # Merged upstream: 033e5899e131a2c1bdf7db5852f816f42aac9227 + { name = "Support-integer-values-in-maxOccurs-attribute"; + hash = "sha256-IZ0DP7io+ihcnB5547cR53FAdnpRLR6z4J5KsNrkfaI="; } + { name = "PR204"; + hash = "sha256-JlxeTnKDFxvEMFBthZsaYRbNOoBvLJhBnXCRoiL/nVw="; } + ] ++ [ ./stringIO.patch ]; meta = with lib; { description = "Python simple and lightweight SOAP Library";