mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
wsdd: 0.6.2 -> 0.6.4
This commit is contained in:
parent
d49ddc24b6
commit
9b5dd00333
@ -1,14 +1,14 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3, fetchpatch }:
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, nixosTests, python3 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "wsdd";
|
pname = "wsdd";
|
||||||
version = "0.6.2";
|
version = "0.6.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "christgau";
|
owner = "christgau";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0444xh1r5wd0zfch1hg1f9s4cw68srrm87hqx16qvlgx6jmz5j0p";
|
sha256 = "0lfvpbk1lkri597ac4gz5x4csfyik8axz4b41i03xsqv9bci2vh6";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
@ -16,12 +16,9 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ python3 ];
|
buildInputs = [ python3 ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
(fetchpatch {
|
# Increase timeout to socket urlopen
|
||||||
# https://github.com/christgau/wsdd/issues/72
|
# See https://github.com/christgau/wsdd/issues/80#issuecomment-76848906
|
||||||
name = "fix_send_messages_using_correct_socket.patch";
|
./increase_timeout.patch
|
||||||
url = "https://github.com/christgau/wsdd/commit/1ed74fe73a9fe2e2720859e2822116d65e4ffa5b.patch";
|
|
||||||
sha256 = "1n9bqvh20nhnvnc5pxvzf9kk8nky6rmbmfryg65lfmr1hmg676zg";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
13
pkgs/servers/wsdd/increase_timeout.patch
Normal file
13
pkgs/servers/wsdd/increase_timeout.patch
Normal 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))
|
Loading…
Reference in New Issue
Block a user