mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{ lib
|
|
, python3
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "searxng";
|
|
version = "unstable-2022-07-15";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "7bf4e8d12d1d0ee53bf71f7c3a4010ef936f25d9";
|
|
sha256 = "sha256-Fuv9AoV9WnI6qMgj4Ve016RF8gaLXYgw89jRROcm/A8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -i 's/==.*$//' requirements.txt
|
|
'';
|
|
|
|
preBuild = ''
|
|
export SEARX_DEBUG="true";
|
|
'';
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
babel
|
|
certifi
|
|
python-dateutil
|
|
flask
|
|
flaskbabel
|
|
brotli
|
|
jinja2
|
|
langdetect
|
|
lxml
|
|
pygments
|
|
pyyaml
|
|
redis
|
|
uvloop
|
|
setproctitle
|
|
httpx
|
|
httpx-socks
|
|
markdown-it-py
|
|
] ++ httpx.optional-dependencies.http2
|
|
++ httpx-socks.optional-dependencies.asyncio;
|
|
|
|
# tests try to connect to network
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
# Create a symlink for easier access to static data
|
|
mkdir -p $out/share
|
|
ln -s ../${python3.sitePackages}/searx/static $out/share/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/searxng/searxng";
|
|
description = "A fork of Searx, a privacy-respecting, hackable metasearch engine";
|
|
license = licenses.agpl3Plus;
|
|
maintainers = with maintainers; [ kranzes ];
|
|
};
|
|
}
|