summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-11-22 11:02:07 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-11-22 12:20:46 -0500
commite5ffff316f93f0c155f66647b6331909d35af668 (patch)
treee8ff4180b5125eef83d865f742e8b1784ce3c086 /gnu
parent07f078dbcffd3b5566d06e5bb4c8aea218348ed0 (diff)
downloadguix-patches-e5ffff316f93f0c155f66647b6331909d35af668.tar
guix-patches-e5ffff316f93f0c155f66647b6331909d35af668.tar.gz
gnu: python-dnspython: Patch out problematic getprotobyname calls.
* gnu/packages/python-xyz.scm (python-dnspython) [phases]{patch-getprotobyname-calls}: New phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0dbf23ebb8..e0682e679d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15911,8 +15911,21 @@ until the object is actually required, and caches the result of said call.")
(base32
"1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
(build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; XXX: requires internet access
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-getprotobyname-calls
+ ;; These calls are problematic in the build environment as there is
+ ;; no /etc/protocols. This breaks the sanity-check phase of any
+ ;; package depnding on this one.
+ (lambda _
+ (substitute* "dns/rdtypes/IN/WKS.py"
+ (("socket.getprotobyname\\('tcp'\\)")
+ "6")
+ (("socket.getprotobyname\\('udp'\\)")
+ "17")))))))
(native-inputs `(("unzip" ,unzip)))
- (arguments '(#:tests? #f)) ; XXX: requires internet access
(home-page "https://www.dnspython.org")
(synopsis "DNS toolkit for Python")
(description