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
|
2023-03-15 16:39:30 +00:00
|
|
|
python3Packages.buildPythonPackage rec {
|
2022-07-14 12:49:19 +00:00
|
|
|
pname = "offpunk";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.1";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-IFqasTI2dZCauLUAq6/rvwkfraVK7SGUXpHCPEgSPGk=";
|
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
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "An Offline-First browser for the smolnet ";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = src.meta.homepage;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = with maintainers; [ DamienCassou ];
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
2023-03-15 16:39:30 +00:00
|
|
|
}
|