Merge pull request #139516 from Izorkin/update-wsdd

wsdd: 0.6.2 -> 0.6.4

authored by Robert Scott and committed by GitHub 1c15d094 1f29d51b

+19 -9
+6 -9
pkgs/servers/wsdd/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3, fetchpatch }: 2 3 stdenv.mkDerivation rec { 4 pname = "wsdd"; 5 - version = "0.6.2"; 6 7 src = fetchFromGitHub { 8 owner = "christgau"; 9 repo = pname; 10 rev = "v${version}"; 11 - sha256 = "0444xh1r5wd0zfch1hg1f9s4cw68srrm87hqx16qvlgx6jmz5j0p"; 12 }; 13 14 nativeBuildInputs = [ makeWrapper ]; ··· 16 buildInputs = [ python3 ]; 17 18 patches = [ 19 - (fetchpatch { 20 - # https://github.com/christgau/wsdd/issues/72 21 - name = "fix_send_messages_using_correct_socket.patch"; 22 - url = "https://github.com/christgau/wsdd/commit/1ed74fe73a9fe2e2720859e2822116d65e4ffa5b.patch"; 23 - sha256 = "1n9bqvh20nhnvnc5pxvzf9kk8nky6rmbmfryg65lfmr1hmg676zg"; 24 - }) 25 ]; 26 27 installPhase = ''
··· 1 + { lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3 }: 2 3 stdenv.mkDerivation rec { 4 pname = "wsdd"; 5 + version = "0.6.4"; 6 7 src = fetchFromGitHub { 8 owner = "christgau"; 9 repo = pname; 10 rev = "v${version}"; 11 + sha256 = "0lfvpbk1lkri597ac4gz5x4csfyik8axz4b41i03xsqv9bci2vh6"; 12 }; 13 14 nativeBuildInputs = [ makeWrapper ]; ··· 16 buildInputs = [ python3 ]; 17 18 patches = [ 19 + # Increase timeout to socket urlopen 20 + # See https://github.com/christgau/wsdd/issues/80#issuecomment-76848906 21 + ./increase_timeout.patch 22 ]; 23 24 installPhase = ''
+13
pkgs/servers/wsdd/increase_timeout.patch
···
··· 1 + diff --git a/src/wsdd.py b/src/wsdd.py 2 + index 88a7a2a..360e4f7 100755 3 + --- a/src/wsdd.py 4 + +++ b/src/wsdd.py 5 + @@ -699,7 +699,7 @@ class WSDClient(WSDUDPMessageHandler): 6 + request.add_header('Host', host) 7 + 8 + try: 9 + - with urllib.request.urlopen(request, None, 2.0) as stream: 10 + + with urllib.request.urlopen(request, None, 5.0) as stream: 11 + self.handle_metadata(stream.read(), endpoint, xaddr) 12 + except urllib.error.URLError as e: 13 + logger.warning('could not fetch metadata from: {} {}'.format(url, e))