2024-01-02 11:29:13 +00:00
|
|
|
{ fetchFromSourcehut
|
|
|
|
, file
|
|
|
|
, installShellFiles
|
|
|
|
, less
|
|
|
|
, lib
|
|
|
|
, offpunk
|
|
|
|
, python3Packages
|
|
|
|
, testers
|
|
|
|
, timg
|
|
|
|
, xdg-utils
|
|
|
|
, xsel
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-03-15 16:39:30 +00:00
|
|
|
pythonDependencies = with python3Packages; [
|
2022-07-14 12:49:19 +00:00
|
|
|
beautifulsoup4
|
2023-08-04 22:07:22 +00:00
|
|
|
chardet
|
2022-07-14 12:49:19 +00:00
|
|
|
cryptography
|
|
|
|
feedparser
|
|
|
|
pillow
|
|
|
|
readability-lxml
|
|
|
|
requests
|
|
|
|
setproctitle
|
|
|
|
];
|
|
|
|
otherDependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
file
|
2022-07-14 12:49:19 +00:00
|
|
|
less
|
|
|
|
timg
|
|
|
|
xdg-utils
|
|
|
|
xsel
|
|
|
|
];
|
|
|
|
in
|
2024-02-07 01:22:34 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "offpunk";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "2.3";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
disabled = python3Packages.pythonOlder "3.7";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~lioploum";
|
2022-07-14 12:49:19 +00:00
|
|
|
repo = "offpunk";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "v${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-Tiby+JjPc7eFQKziQFUdqcNgx9UhU4GNeRcI/aAzcvk=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [ python3Packages.hatchling installShellFiles ];
|
2023-03-15 16:39:30 +00:00
|
|
|
propagatedBuildInputs = otherDependencies ++ pythonDependencies;
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage man/*.1
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = offpunk; };
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Command-line and offline-first smolnet browser/feed reader";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = src.meta.homepage;
|
2024-02-29 20:09:43 +00:00
|
|
|
license = lib.licenses.agpl3Plus;
|
|
|
|
mainProgram = "offpunk";
|
|
|
|
maintainers = with lib.maintainers; [ DamienCassou ];
|
|
|
|
platforms = lib.platforms.linux;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
2023-03-15 16:39:30 +00:00
|
|
|
}
|