Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / namebench / default.nix
blobb7b542b8a7a9b4b832a63ef41b456e7e6fd8b336
1 { lib
2 , buildPythonPackage
3 , isPy3k
4 , isPyPy
5 , fetchurl
6 , tkinter
7 }:
9 buildPythonPackage rec {
10   pname = "namebench";
11   version = "1.3.1";
12   disabled = isPy3k || isPyPy;
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   };
19   # error: invalid command 'test'
20   doCheck = false;
22   propagatedBuildInputs = [ tkinter ];
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   '';
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   };