Unverified Commit 441951c0 authored by Nikolay Korotkiy's avatar Nikolay Korotkiy Committed by GitHub
Browse files

offpunk: 3.0 -> 3.1 (#500000)

parents d6ce3861 30734854
Loading
Loading
Loading
Loading
+33 −10
Original line number Diff line number Diff line
{
  lib,
  python3Packages,
  fetchFromSourcehut,
  file,
  gettext,
  installShellFiles,
  less,
  offpunk,
  testers,
  lib,
  python3Packages,
  timg,
  versionCheckHook,
  xdg-utils,
  xsel,
}:

python3Packages.buildPythonApplication (finalAttrs: {
  pname = "offpunk";
  version = "3.0";
  version = "3.1";
  pyproject = true;

  src = fetchFromSourcehut {
    owner = "~lioploum";
    repo = "offpunk";
    rev = "v${finalAttrs.version}";
    hash = "sha256-5SoMa93QbwbsryeHGc3pkkDA8v9eonZvuflSuDV2hmI=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-RwigItHVNsgq6k3O8YrSMFBaZMJwJSzB6dfnNiYsefY=";
  };

  build-system = with python3Packages; [ hatchling ];
@@ -44,20 +43,44 @@ python3Packages.buildPythonApplication (finalAttrs: {
    chardet
    cryptography
    feedparser
    hatch-requirements-txt
    readability-lxml
    requests
    setproctitle
  ]);

  /*
    False positive from pythonRuntimeDepsCheckHook:
      - "bs4" is the import name for beautifulsoup4 (not the PyPI
        package name)
      - "file" refers to the system `file` binary, not a Python
        package
  */
  pythonRemoveDeps = [
    "bs4"
    "file"
  ];

  postInstall = ''
    installManPage man/*.1
  '';

  passthru.tests.version = testers.testVersion { package = offpunk; };
  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  meta = {
    description = "Command-line and offline-first smolnet browser/feed reader";
    homepage = finalAttrs.src.meta.homepage;
    changelog = "https://git.sr.ht/~lioploum/offpunk/tree/v${finalAttrs.version}/item/CHANGELOG";
    description = "CLI and offline-first smolnet browser/feed reader";
    longDescription = ''
      Offpunk allows you to browse the Web, Gemini, Gopher and
      subscribe to RSS feeds without leaving your terminal and while
      being offline.

      The goal of Offpunk is to be able to synchronise your content
      once (a day, a week, a month) and then browse/organise it while
      staying disconnected.
    '';
    homepage = "https://offpunk.net";
    license = lib.licenses.agpl3Plus;
    mainProgram = "offpunk";
    maintainers = with lib.maintainers; [ DamienCassou ];