59 lines
1.3 KiB
Nix
59 lines
1.3 KiB
Nix
|
|
{
|
||
|
|
lib,
|
||
|
|
fetchFromGitHub,
|
||
|
|
rustPlatform,
|
||
|
|
openssl,
|
||
|
|
pkg-config,
|
||
|
|
}:
|
||
|
|
let
|
||
|
|
version = "1.24.22";
|
||
|
|
in
|
||
|
|
rustPlatform.buildRustPackage {
|
||
|
|
pname = "websurfx";
|
||
|
|
inherit version;
|
||
|
|
|
||
|
|
src = fetchFromGitHub {
|
||
|
|
owner = "neon-mmd";
|
||
|
|
repo = "websurfx";
|
||
|
|
tag = "v${version}";
|
||
|
|
hash = "sha256-l04M2veWipVmmR4lN5+8mHpL2/16JMd3biRzEIacgac=";
|
||
|
|
};
|
||
|
|
|
||
|
|
nativeBuildInputs = [
|
||
|
|
pkg-config
|
||
|
|
];
|
||
|
|
|
||
|
|
buildInputs = [
|
||
|
|
openssl
|
||
|
|
];
|
||
|
|
|
||
|
|
cargoHash = "sha256-ekosi4t0InWh1c14jEe2MAWPCQ4qnqwPFvTAtAlwiuw=";
|
||
|
|
|
||
|
|
postPatch = ''
|
||
|
|
substituteInPlace src/handler.rs \
|
||
|
|
--replace-fail "/etc/xdg" "$out/etc/xdg" \
|
||
|
|
--replace-fail "/opt/websurfx" "$out/opt/websurfx"
|
||
|
|
'';
|
||
|
|
|
||
|
|
postInstall = ''
|
||
|
|
mkdir -p $out/etc/xdg
|
||
|
|
mkdir -p $out/opt/websurfx
|
||
|
|
|
||
|
|
cp -r websurfx $out/etc/xdg/
|
||
|
|
cp -r public $out/opt/websurfx/
|
||
|
|
'';
|
||
|
|
|
||
|
|
meta = {
|
||
|
|
description = "Open source alternative to searx";
|
||
|
|
longDescription = ''
|
||
|
|
An open source alternative to searx which provides a modern-looking,
|
||
|
|
lightning-fast, privacy respecting, secure meta search engine.
|
||
|
|
'';
|
||
|
|
homepage = "https://github.com/neon-mmd/websurfx";
|
||
|
|
changelog = "https://github.com/neon-mmd/websurfx/releases";
|
||
|
|
license = lib.licenses.agpl3Plus;
|
||
|
|
maintainers = with lib.maintainers; [ theobori ];
|
||
|
|
mainProgram = "websurfx";
|
||
|
|
};
|
||
|
|
}
|