1{ lib
2, buildPythonPackage
3, isPy3k
4, isPyPy
5, fetchurl
6, tkinter
7}:
8
9buildPythonPackage rec {
10 pname = "namebench";
11 version = "1.3.1";
12 disabled = isPy3k || isPyPy;
13
14 src = fetchurl {
15 url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/{pname}/${pname}-${version}-source.tgz";
16 sha256 = "09clbcd6wxgk4r6qw7hb78h818mvca7lijigy1mlq5y1f3lgkk1h";
17 };
18
19 # error: invalid command 'test'
20 doCheck = false;
21
22 propagatedBuildInputs = [ tkinter ];
23
24 # namebench expects to be run from its own source tree (it uses relative
25 # paths to various resources), make it work.
26 postInstall = ''
27 sed -i "s|import os|import os; os.chdir(\"$out/namebench\")|" "$out/bin/namebench.py"
28 '';
29
30 meta = with lib; {
31 homepage = "https://github.com/google/namebench"; # Formerly https://code.google.com/archive/p/namebench/
32 description = "Find fastest DNS servers available";
33 license = with licenses; [
34 asl20
35 # third-party program licenses (embedded in the sources)
36 lgpl21 # Crystal_Clear
37 isc # dns
38 bsd3 # jinja2
39 ];
40 longDescription = ''
41 It hunts down the fastest DNS servers available for your computer to
42 use. namebench runs a fair and thorough benchmark using your web
43 browser history, tcpdump output, or standardized datasets in order
44 to provide an individualized recommendation. namebench is completely
45 free and does not modify your system in any way.
46 '';
47 };
48
49}