Unverified Commit 067a39e4 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

newelle: init at 0.9.7 (#409626)

parents 15293a19 364a4d0d
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
{
  lib,
  python3Packages,
  fetchFromGitHub,
  meson,
  ninja,
  pkg-config,
  wrapGAppsHook4,
  gobject-introspection,
  desktop-file-utils,
  libadwaita,
  vte-gtk4,
  gsettings-desktop-schemas,
  gtksourceview5,
  lsb-release,
  bash,
  ffmpeg,
  nix-update-script,
}:

python3Packages.buildPythonApplication rec {
  pname = "newelle";
  version = "0.9.7";
  pyproject = false; # uses meson

  src = fetchFromGitHub {
    owner = "qwersyk";
    repo = "Newelle";
    tag = version;
    hash = "sha256-h0dWjnUqWcPdSbR60HF2KvQxUyYeR3qHf2GMHt/kSm0=";
  };

  postPatch = ''
    substituteInPlace src/utility/pip.py \
      --replace-fail "# Manage pip path locking" "return None"
  '';

  nativeBuildInputs = [
    meson
    ninja
    gobject-introspection
    wrapGAppsHook4
    desktop-file-utils
    pkg-config
  ];

  buildInputs = [
    libadwaita
    vte-gtk4
    gsettings-desktop-schemas
    gtksourceview5
  ];

  dependencies = with python3Packages; [
    pygobject3
    libxml2
    pydub
    gtts
    speechrecognition
    numpy
    matplotlib
    pylatexenc
    pyaudio
    pip-install-test
    newspaper3k
    tiktoken
    openai
    ollama
    llama-index-core
    llama-index-readers-file
    google-genai
    anthropic
  ];

  strictDeps = true;

  postInstallCheck = ''
    mesonCheckPhase
  '';

  dontWrapGApps = true;

  makeWrapperArgs = [
    "\${gappsWrapperArgs[@]}"
    "--prefix PATH : ${
      lib.makeBinPath [
        lsb-release
        bash
        ffmpeg
      ]
    }"
  ];

  passthru.updateScript = nix-update-script { };

  meta = {
    homepage = "https://github.com/qwersyk/Newelle";
    description = "Ultimate Virtual Assistant";
    mainProgram = "newelle";
    license = lib.licenses.gpl3Plus;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [ emaryn ];
  };
}
+43 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  feedparser,
  requests,
  pillow,
  tldextract,
  lxml,
  lxml-html-clean,
  beautifulsoup4,
  python-dateutil,
}:

buildPythonPackage rec {
  pname = "newspaper3k";
  version = "0.2.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-nxvT4ftI9ADHFav4dcx7Cme33c2H9Qya7rj8u72QBPs=";
  };

  dependencies = [
    feedparser
    requests
    pillow
    tldextract
    lxml
    lxml-html-clean
    beautifulsoup4
    python-dateutil
  ];

  pythonImportsCheck = [ "newspaper" ];

  meta = {
    description = "Simplified python article discovery & extraction";
    homepage = "https://pypi.org/project/newspaper3k";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ emaryn ];
  };
}
+24 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
}:

buildPythonPackage rec {
  pname = "pip-install-test";
  version = "0.5";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-wzxGztmGW1mWPoblSQGUdSC9tzv5GEnN27AAdCWYu2c=";
  };

  pythonImportsCheck = [ "pip_install_test" ];

  meta = {
    description = "Minimal stub package to test success of pip install";
    homepage = "https://pypi.org/project/pip-install-test";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ emaryn ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -10089,6 +10089,8 @@ self: super: with self; {
  newick = callPackage ../development/python-modules/newick { };
  newspaper3k = callPackage ../development/python-modules/newspaper3k { };
  newversion = callPackage ../development/python-modules/newversion { };
  nexia = callPackage ../development/python-modules/nexia { };
@@ -11367,6 +11369,8 @@ self: super: with self; {
  pip-chill = callPackage ../development/python-modules/pip-chill { };
  pip-install-test = callPackage ../development/python-modules/pip-install-test { };
  pip-requirements-parser = callPackage ../development/python-modules/pip-requirements-parser { };
  pip-system-certs = callPackage ../development/python-modules/pip-system-certs { };