nixpkgs/pkgs/applications/networking/browsers/offpunk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.3 KiB
Nix
Raw Normal View History

2022-07-02 10:11:45 +00:00
{
fetchFromSourcehut,
2022-07-02 10:11:45 +00:00
less,
lib,
makeWrapper,
offpunk,
python3,
stdenv,
testers,
2022-07-02 10:11:45 +00:00
timg,
xdg-utils,
xsel,
}:
let
pythonDependencies = with python3.pkgs; [
beautifulsoup4
cryptography
feedparser
pillow
readability-lxml
requests
setproctitle
];
otherDependencies = [
less
timg
xdg-utils
xsel
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "offpunk";
2022-12-11 10:29:52 +00:00
version = "1.8";
2022-07-02 10:11:45 +00:00
src = fetchFromSourcehut {
owner = "~lioploum";
2022-07-02 10:11:45 +00:00
repo = "offpunk";
rev = "v${finalAttrs.version}";
2022-12-11 10:29:52 +00:00
sha256 = "0xv7b3qkwyq55sz7c0v0pknrpikhzyqgr5y4y30cwa7jd8sn423f";
2022-07-02 10:11:45 +00:00
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = otherDependencies ++ pythonDependencies;
2022-07-02 10:11:45 +00:00
installPhase = ''
runHook preInstall
install -D ./offpunk.py $out/bin/offpunk
wrapProgram $out/bin/offpunk \
--set PYTHONPATH "$PYTHONPATH" \
--set PATH ${lib.makeBinPath otherDependencies}
runHook postInstall
'';
passthru.tests.version = testers.testVersion { package = offpunk; };
2022-08-04 11:43:46 +00:00
2022-07-02 10:11:45 +00:00
meta = with lib; {
description = "An Offline-First browser for the smolnet ";
homepage = finalAttrs.src.meta.homepage;
2022-07-02 10:11:45 +00:00
maintainers = with maintainers; [ DamienCassou ];
platforms = platforms.linux;
license = licenses.bsd2;
};
})