2023-11-18 06:44:56 +00:00
|
|
|
{ fetchFromSourcehut
|
|
|
|
, file
|
|
|
|
, installShellFiles
|
|
|
|
, less
|
|
|
|
, lib
|
|
|
|
, offpunk
|
|
|
|
, python3Packages
|
|
|
|
, testers
|
|
|
|
, timg
|
|
|
|
, xdg-utils
|
|
|
|
, xsel
|
2022-07-02 10:11:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-03-12 15:07:33 +00:00
|
|
|
pythonDependencies = with python3Packages; [
|
2022-07-02 10:11:45 +00:00
|
|
|
beautifulsoup4
|
2023-07-31 12:28:25 +00:00
|
|
|
chardet
|
2022-07-02 10:11:45 +00:00
|
|
|
cryptography
|
|
|
|
feedparser
|
|
|
|
pillow
|
|
|
|
readability-lxml
|
|
|
|
requests
|
|
|
|
setproctitle
|
|
|
|
];
|
|
|
|
otherDependencies = [
|
2023-11-16 12:17:36 +00:00
|
|
|
file
|
2022-07-02 10:11:45 +00:00
|
|
|
less
|
|
|
|
timg
|
|
|
|
xdg-utils
|
|
|
|
xsel
|
|
|
|
];
|
|
|
|
in
|
2024-01-30 23:43:39 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2022-07-02 10:11:45 +00:00
|
|
|
pname = "offpunk";
|
2024-02-12 21:47:52 +00:00
|
|
|
version = "2.2";
|
2024-01-30 23:43:39 +00:00
|
|
|
pyproject = true;
|
2023-03-13 16:19:30 +00:00
|
|
|
|
|
|
|
disabled = python3Packages.pythonOlder "3.7";
|
2022-07-02 10:11:45 +00:00
|
|
|
|
2022-12-11 10:24:20 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~lioploum";
|
2022-07-02 10:11:45 +00:00
|
|
|
repo = "offpunk";
|
2023-03-12 15:07:33 +00:00
|
|
|
rev = "v${version}";
|
2024-02-12 21:47:52 +00:00
|
|
|
hash = "sha256-ygVL17qqmNB7hzw1VuYIAbirbaq4EVppWCHSvTl+/Jw=";
|
2022-07-02 10:11:45 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 12:17:36 +00:00
|
|
|
nativeBuildInputs = [ python3Packages.hatchling installShellFiles ];
|
2023-03-12 15:07:33 +00:00
|
|
|
propagatedBuildInputs = otherDependencies ++ pythonDependencies;
|
2022-07-02 10:11:45 +00:00
|
|
|
|
2023-03-12 15:07:33 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage man/*.1
|
2022-07-02 10:11:45 +00:00
|
|
|
'';
|
|
|
|
|
2022-08-04 11:43:46 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = offpunk; };
|
|
|
|
|
2024-02-12 21:47:52 +00:00
|
|
|
meta = {
|
2024-01-30 23:43:39 +00:00
|
|
|
description = "A command-line and offline-first smolnet browser/feed reader";
|
2023-03-12 15:07:33 +00:00
|
|
|
homepage = src.meta.homepage;
|
2024-02-12 21:47:52 +00:00
|
|
|
license = lib.licenses.agpl3Plus;
|
|
|
|
mainProgram = "offpunk";
|
|
|
|
maintainers = with lib.maintainers; [ DamienCassou ];
|
|
|
|
platforms = lib.platforms.linux;
|
2022-07-02 10:11:45 +00:00
|
|
|
};
|
2023-03-12 15:07:33 +00:00
|
|
|
}
|