1{ stdenv
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 = "http://namebench.googlecode.com/files/${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 stdenv.lib; {
31 homepage = http://namebench.googlecode.com/;
32 description = "Find fastest DNS servers available";
33 license = with licenses; [
34 asl20
35 # third-party program licenses (embedded in the sources)
36 "LGPL" # Crystal_Clear
37 free # dns
38 asl20 # graphy
39 "BSD" # jinja2
40 ];
41 longDescription = ''
42 It hunts down the fastest DNS servers available for your computer to
43 use. namebench runs a fair and thorough benchmark using your web
44 browser history, tcpdump output, or standardized datasets in order
45 to provide an individualized recommendation. namebench is completely
46 free and does not modify your system in any way.
47 '';
48 };
49
50}