From cb1546dedb16b402f994e5e167753424824296c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 14 Feb 2023 17:34:46 +0100 Subject: [PATCH 1/3] python310Packages.fasttext-predict: init at 0.9.2.1 --- .../fasttext-predict/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/fasttext-predict/default.nix diff --git a/pkgs/development/python-modules/fasttext-predict/default.nix b/pkgs/development/python-modules/fasttext-predict/default.nix new file mode 100644 index 000000000000..9e46a4b8ceeb --- /dev/null +++ b/pkgs/development/python-modules/fasttext-predict/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pybind11 +}: + +buildPythonPackage rec { + pname = "fasttext-predict"; + version = "0.9.2.1"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-iSCt54tqBmNfrcntDFRXb550607Zr1mMCO2PC1ZbVQw="; + }; + + nativeBuildInputs = [ + pybind11 + ]; + + # tests are removed from fork + doCheck = false; + + pythonImportsCheck = [ "fasttext" ]; + + meta = with lib; { + description = "fasttext with wheels and no external dependency, but only the predict method (<1MB)"; + homepage = "https://github.com/searxng/fasttext-predict/"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + # ImportError: dynamic module does not define module export function (PyInit_fasttext_pybind) + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf7d7643e03f..16fa75e83aa0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3291,6 +3291,8 @@ self: super: with self; { fasttext = callPackage ../development/python-modules/fasttext { }; + fasttext-predict = callPackage ../development/python-modules/fasttext-predict { }; + favicon = callPackage ../development/python-modules/favicon { }; fb-re2 = callPackage ../development/python-modules/fb-re2 { }; From 4ce10e413f7d465ef64be53ac7144475f1e5fc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 14 Feb 2023 17:35:01 +0100 Subject: [PATCH 2/3] searxng: unstable-2022-09-01 -> unstable-2023-03-13 This was motivated by an incompatibility caused by a recent babel or flask-babel update. --- pkgs/servers/web-apps/searxng/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/web-apps/searxng/default.nix b/pkgs/servers/web-apps/searxng/default.nix index 2b1a6f69b512..d3df5e1e6801 100644 --- a/pkgs/servers/web-apps/searxng/default.nix +++ b/pkgs/servers/web-apps/searxng/default.nix @@ -5,13 +5,13 @@ python3.pkgs.buildPythonApplication rec { pname = "searxng"; - version = "unstable-2022-09-01"; + version = "unstable-2023-03-13"; src = fetchFromGitHub { owner = pname; repo = pname; - rev = "174e5242569812618af4ebd9a646ba2a6ded5459"; - sha256 = "sha256-Q1+4HkgOoTRtW5XYWpC5dpukkrjG5fP0585soo/srmQ="; + rev = "295c87a926c3deb1e438234550a9d8fbbaad17fa"; + sha256 = "sha256-ItPFUyyuctx/yyMVUn5Ez9f+taNiV6FR0q9wz1jwk8M="; }; postPatch = '' @@ -26,11 +26,11 @@ python3.pkgs.buildPythonApplication rec { babel certifi python-dateutil + fasttext-predict flask flask-babel brotli jinja2 - langdetect lxml pygments pyyaml From 820c86da446b74850c53e123346892a75b3bc5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 15 Feb 2023 16:23:18 +0100 Subject: [PATCH 3/3] searxng: replace maintainer Kranzes with me as offered in the PR --- pkgs/servers/web-apps/searxng/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/web-apps/searxng/default.nix b/pkgs/servers/web-apps/searxng/default.nix index d3df5e1e6801..9ea17db9ee13 100644 --- a/pkgs/servers/web-apps/searxng/default.nix +++ b/pkgs/servers/web-apps/searxng/default.nix @@ -56,6 +56,6 @@ python3.pkgs.buildPythonApplication rec { homepage = "https://github.com/searxng/searxng"; description = "A fork of Searx, a privacy-respecting, hackable metasearch engine"; license = licenses.agpl3Plus; - maintainers = with maintainers; [ kranzes ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; }