diff options
Diffstat (limited to 'pkgs/by-name/se')
-rw-r--r-- | pkgs/by-name/se/searxng/package.nix | 15 | ||||
-rw-r--r-- | pkgs/by-name/se/sequoia-sq/package.nix | 80 |
2 files changed, 88 insertions, 7 deletions
diff --git a/pkgs/by-name/se/searxng/package.nix b/pkgs/by-name/se/searxng/package.nix index 24fd8be88478..6f541d8a3b38 100644 --- a/pkgs/by-name/se/searxng/package.nix +++ b/pkgs/by-name/se/searxng/package.nix @@ -5,13 +5,13 @@ python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec { pname = "searxng"; - version = "unstable-2023-10-31"; + version = "0-unstable-2024-02-24"; src = fetchFromGitHub { - owner = pname; - repo = pname; - rev = "b05a15540e1dc2dfb8e4e25aa537b2a68e713844"; - hash = "sha256-x0PyS+A4KjbBnTpca17Wx3BQjtOHvVuWpusPPc1ULnU="; + owner = "searxng"; + repo = "searxng"; + rev = "d72fa99bd0a4d702a55188b07919ce5a764b1d6c"; + hash = "sha256-1A7dyWrF63fSSvWP+2HrCS6H8o/4CUlqiP0KANVZHUA="; }; postPatch = '' @@ -20,7 +20,7 @@ python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec { preBuild = let - versionString = lib.concatStringsSep "." (builtins.tail (lib.splitString "-" version)); + versionString = lib.concatStringsSep "." (builtins.tail (lib.splitString "-" (lib.removePrefix "0-" version))); commitAbbrev = builtins.substring 0 8 src.rev; in '' @@ -66,13 +66,14 @@ python3.pkgs.toPythonModule (python3.pkgs.buildPythonApplication rec { ln -s ../${python3.sitePackages}/searx/static $out/share/ # copy config schema for the limiter - cp searx/botdetection/limiter.toml $out/${python3.sitePackages}/searx/botdetection/limiter.toml + cp searx/limiter.toml $out/${python3.sitePackages}/searx/limiter.toml ''; meta = with lib; { homepage = "https://github.com/searxng/searxng"; description = "A fork of Searx, a privacy-respecting, hackable metasearch engine"; license = licenses.agpl3Plus; + mainProgram = "searxng-run"; maintainers = with maintainers; [ SuperSandro2000 _999eagle ]; }; }) diff --git a/pkgs/by-name/se/sequoia-sq/package.nix b/pkgs/by-name/se/sequoia-sq/package.nix new file mode 100644 index 000000000000..54e19ba073fa --- /dev/null +++ b/pkgs/by-name/se/sequoia-sq/package.nix @@ -0,0 +1,80 @@ +{ stdenv +, fetchFromGitLab +, fetchpatch +, lib +, darwin +, nettle +, nix-update-script +, rustPlatform +, pkg-config +, capnproto +, installShellFiles +, openssl +, sqlite +}: + +rustPlatform.buildRustPackage rec { + pname = "sequoia-sq"; + version = "0.34.0"; + + src = fetchFromGitLab { + owner = "sequoia-pgp"; + repo = "sequoia-sq"; + rev = "v${version}"; + hash = "sha256-voFektWZnkmIQzI7s5nKzVVWQtEhzk2GKtxX926RtxU="; + }; + patches = [ + # Fixes test failing on Darwin, see: + # https://gitlab.com/sequoia-pgp/sequoia-sq/-/issues/211 + (fetchpatch { + url = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/commit/21221a935e0d058ed269ae6c8f45c5fa7ea0d598.patch"; + hash = "sha256-ZjTl3EumeFwMJUl+qMpX+P2maYz4Ow/Tn9KwYbHDbes="; + }) + ]; + + cargoHash = "sha256-3ncBpRi0v6g6wwPkSASDwt0d8cOOAUv9BwZaYvnif1U="; + + nativeBuildInputs = [ + pkg-config + rustPlatform.bindgenHook + capnproto + installShellFiles + ]; + + buildInputs = [ + openssl + sqlite + nettle + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]); + + # Sometimes, tests fail on CI (ofborg) & hydra without this + checkFlags = [ + # doctest for sequoia-ipc fail for some reason + "--skip=macros::assert_send_and_sync" + "--skip=macros::time_it" + ]; + + env.ASSET_OUT_DIR = "/tmp/"; + + doCheck = true; + + postInstall = '' + installManPage /tmp/man-pages/*.* + installShellCompletion \ + --cmd sq \ + --bash /tmp/shell-completions/sq.bash \ + --fish /tmp/shell-completions/sq.fish \ + --zsh /tmp/shell-completions/_sq + ''; + + passthru.updateScript = nix-update-script { }; + + meta = with lib; { + description = "A cool new OpenPGP implementation"; + homepage = "https://sequoia-pgp.org/"; + changelog = "https://gitlab.com/sequoia-pgp/sequoia-sq/-/blob/v${version}/NEWS"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ minijackson doronbehar ]; + mainProgram = "sq"; + }; +} |