commit 71aa22dfde881db81cc2f7ca0ceeb69d824a5ed1
parent e36a458895476d78a683edf76bbedbfdc445decb
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 3 Aug 2020 21:33:16 +0300
Add zdict
Diffstat:
3 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -798,5 +798,19 @@
"type": "tarball",
"url": "https://github.com/consbio/tpkutils/archive/5aec5e5a996b16575812d90586a5cd1e865437bf.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
+ "zdict": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2020-08-03T13:02:32Z",
+ "description": "The last online dictionary framework you need",
+ "homepage": "https://pypi.org/project/zdict/",
+ "owner": "zdict",
+ "repo": "zdict",
+ "rev": "dfeec3bf36da1ef201b8aa4334e76bfc8f8a4b7e",
+ "sha256": "009ampc6wnpd15yipmmw5pfmj2zsd4sb0dh132y7mgf3sscxp2sb",
+ "type": "tarball",
+ "url": "https://github.com/zdict/zdict/archive/dfeec3bf36da1ef201b8aa4334e76bfc8f8a4b7e.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -162,6 +162,7 @@ lib.makeScope newScope (
tilesets-cli = callPackage ./tools/geo/tilesets-cli { };
tpkutils = callPackage ./tools/geo/tpkutils { };
xfractint = callPackage ./tools/xfractint { };
+ zdict = callPackage ./tools/dict/zdict { };
### SERVERS
diff --git a/pkgs/tools/dict/zdict/default.nix b/pkgs/tools/dict/zdict/default.nix
@@ -0,0 +1,34 @@
+{ lib, python37Packages, sources }:
+let
+ pname = "zdict";
+ date = lib.substring 0 10 sources.zdict.date;
+ version = "unstable-" + date;
+in
+python37Packages.buildPythonApplication {
+ inherit pname version;
+ src = sources.zdict;
+
+ propagatedBuildInputs = with python37Packages; [
+ beautifulsoup4
+ peewee
+ requests
+ setuptools
+ ];
+
+ buildPhase = ''
+ ${python37Packages.python.interpreter} setup.py build
+ '';
+
+ doCheck = false;
+
+ installPhase = ''
+ ${python37Packages.python.interpreter} setup.py install --skip-build --prefix=$out
+ '';
+
+ meta = with lib; {
+ inherit (sources.zdict) description homepage;
+ license = licenses.gpl3;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}