3
0
Fork 0
forked from mirrors/nixpkgs

wsdd: 0.6.2 -> 0.6.4

This commit is contained in:
Izorkin 2021-09-26 11:44:37 +03:00
parent d49ddc24b6
commit 9b5dd00333
No known key found for this signature in database
GPG key ID: 1436C1B3F3679F09
2 changed files with 19 additions and 9 deletions

View file

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3, fetchpatch }:
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3 }:
stdenv.mkDerivation rec {
pname = "wsdd";
version = "0.6.2";
version = "0.6.4";
src = fetchFromGitHub {
owner = "christgau";
repo = pname;
rev = "v${version}";
sha256 = "0444xh1r5wd0zfch1hg1f9s4cw68srrm87hqx16qvlgx6jmz5j0p";
sha256 = "0lfvpbk1lkri597ac4gz5x4csfyik8axz4b41i03xsqv9bci2vh6";
};
nativeBuildInputs = [ makeWrapper ];
@ -16,12 +16,9 @@ stdenv.mkDerivation rec {
buildInputs = [ python3 ];
patches = [
(fetchpatch {
# https://github.com/christgau/wsdd/issues/72
name = "fix_send_messages_using_correct_socket.patch";
url = "https://github.com/christgau/wsdd/commit/1ed74fe73a9fe2e2720859e2822116d65e4ffa5b.patch";
sha256 = "1n9bqvh20nhnvnc5pxvzf9kk8nky6rmbmfryg65lfmr1hmg676zg";
})
# Increase timeout to socket urlopen
# See https://github.com/christgau/wsdd/issues/80#issuecomment-76848906
./increase_timeout.patch
];
installPhase = ''

View file

@ -0,0 +1,13 @@
diff --git a/src/wsdd.py b/src/wsdd.py
index 88a7a2a..360e4f7 100755
--- a/src/wsdd.py
+++ b/src/wsdd.py
@@ -699,7 +699,7 @@ class WSDClient(WSDUDPMessageHandler):
request.add_header('Host', host)
try:
- with urllib.request.urlopen(request, None, 2.0) as stream:
+ with urllib.request.urlopen(request, None, 5.0) as stream:
self.handle_metadata(stream.read(), endpoint, xaddr)
except urllib.error.URLError as e:
logger.warning('could not fetch metadata from: {} {}'.format(url, e))