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