diff options
author | Chris Ostrouchov <chris.ostrouchov@gmail.com> | 2018-10-17 11:46:00 -0400 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2018-10-18 11:02:23 +0200 |
commit | d448a1dd5765fcf45c8c6586423ca90cbb66b7f3 (patch) | |
tree | e7e105a1eb300ce5b69302219d63ef648c23d756 | |
parent | 76eea7cf645da588847e64db7cb99852ab1db731 (diff) | |
download | nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.tar nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.tar.gz nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.tar.bz2 nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.tar.lz nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.tar.xz nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.tar.zst nixlib-d448a1dd5765fcf45c8c6586423ca90cbb66b7f3.zip |
pythonPackages.namebench: refactor move to python-modules
-rw-r--r-- | pkgs/development/python-modules/namebench/default.nix | 50 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 42 |
2 files changed, 51 insertions, 41 deletions
diff --git a/pkgs/development/python-modules/namebench/default.nix b/pkgs/development/python-modules/namebench/default.nix new file mode 100644 index 000000000000..a930f250d80c --- /dev/null +++ b/pkgs/development/python-modules/namebench/default.nix @@ -0,0 +1,50 @@ +{ stdenv +, buildPythonPackage +, isPy3k +, isPyPy +, fetchurl +, tkinter +}: + +buildPythonPackage rec { + pname = "namebench"; + version = "1.3.1"; + disabled = isPy3k || isPyPy; + + src = fetchurl { + url = "http://namebench.googlecode.com/files/${pname}-${version}-source.tgz"; + sha256 = "09clbcd6wxgk4r6qw7hb78h818mvca7lijigy1mlq5y1f3lgkk1h"; + }; + + # error: invalid command 'test' + doCheck = false; + + propagatedBuildInputs = [ tkinter ]; + + # namebench expects to be run from its own source tree (it uses relative + # paths to various resources), make it work. + postInstall = '' + sed -i "s|import os|import os; os.chdir(\"$out/namebench\")|" "$out/bin/namebench.py" + ''; + + meta = with stdenv.lib; { + homepage = http://namebench.googlecode.com/; + description = "Find fastest DNS servers available"; + license = with licenses; [ + asl20 + # third-party program licenses (embedded in the sources) + "LGPL" # Crystal_Clear + free # dns + asl20 # graphy + "BSD" # jinja2 + ]; + longDescription = '' + It hunts down the fastest DNS servers available for your computer to + use. namebench runs a fair and thorough benchmark using your web + browser history, tcpdump output, or standardized datasets in order + to provide an individualized recommendation. namebench is completely + free and does not modify your system in any way. + ''; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 39c54901a80a..bd70364474f7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2897,47 +2897,7 @@ in { mysql-connector = callPackage ../development/python-modules/mysql-connector { }; - namebench = buildPythonPackage (rec { - name = "namebench-1.3.1"; - disabled = isPy3k || isPyPy; - - src = pkgs.fetchurl { - url = "http://namebench.googlecode.com/files/${name}-source.tgz"; - sha256 = "09clbcd6wxgk4r6qw7hb78h818mvca7lijigy1mlq5y1f3lgkk1h"; - }; - - # error: invalid command 'test' - doCheck = false; - - propagatedBuildInputs = [ self.tkinter ]; - - # namebench expects to be run from its own source tree (it uses relative - # paths to various resources), make it work. - postInstall = '' - sed -i "s|import os|import os; os.chdir(\"$out/namebench\")|" "$out/bin/namebench.py" - ''; - - meta = { - homepage = http://namebench.googlecode.com/; - description = "Find fastest DNS servers available"; - license = with licenses; [ - asl20 - # third-party program licenses (embedded in the sources) - "LGPL" # Crystal_Clear - free # dns - asl20 # graphy - "BSD" # jinja2 - ]; - longDescription = '' - It hunts down the fastest DNS servers available for your computer to - use. namebench runs a fair and thorough benchmark using your web - browser history, tcpdump output, or standardized datasets in order - to provide an individualized recommendation. namebench is completely - free and does not modify your system in any way. - ''; - }; - }); - + namebench = callPackage ../development/python-modules/namebench { }; nameparser = callPackage ../development/python-modules/nameparser { }; |