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.

69 lines
1.3 KiB
Nix
Raw Normal View History

2022-07-02 11:11:45 +01:00
{
fetchFromGitea,
less,
lib,
makeWrapper,
offpunk,
python3,
stdenv,
testers,
2022-07-02 11:11:45 +01: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-11-28 20:38:10 +00:00
version = "1.7.1";
2022-07-02 11:11:45 +01:00
src = fetchFromGitea {
domain = "notabug.org";
owner = "ploum";
repo = "offpunk";
rev = "v${finalAttrs.version}";
2022-11-28 20:38:10 +00:00
sha256 = "1y1xb1ccsprl0xkn4hlh09j8y5xpdn6r860xlrmk12wfk2xrfbfy";
2022-07-02 11:11:45 +01:00
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = otherDependencies ++ pythonDependencies;
2022-07-02 11:11:45 +01: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 12:43:46 +01:00
2022-07-02 11:11:45 +01:00
meta = with lib; {
description = "An Offline-First browser for the smolnet ";
homepage = "https://notabug.org/ploum/offpunk";
maintainers = with maintainers; [ DamienCassou ];
platforms = platforms.linux;
license = licenses.bsd2;
};
})