about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/offpunk
diff options
context:
space:
mode:
authorDamien Cassou <damien@cassou.me>2022-07-02 12:11:45 +0200
committerDamien Cassou <damien@cassou.me>2022-07-03 20:59:27 +0200
commit31c14633431c17520333ed6d18eaa0e63688ab12 (patch)
treecca702b6d5e41f90089fe227314c001b6c051b05 /pkgs/applications/networking/browsers/offpunk
parent5c02ac6e068f33662efa4f0a5c7f81e9456cabf9 (diff)
offpunk: init at 1.4
Diffstat (limited to 'pkgs/applications/networking/browsers/offpunk')
-rw-r--r--pkgs/applications/networking/browsers/offpunk/default.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/offpunk/default.nix b/pkgs/applications/networking/browsers/offpunk/default.nix
new file mode 100644
index 0000000000000..dcfe1d4b65707
--- /dev/null
+++ b/pkgs/applications/networking/browsers/offpunk/default.nix
@@ -0,0 +1,67 @@
+{
+  fetchFromGitea,
+  less,
+  lib,
+  makeWrapper,
+  offpunk,
+  python3,
+  ripgrep,
+  stdenv,
+  testVersion,
+  timg,
+  xdg-utils,
+  xsel,
+}:
+
+let
+  pythonDependencies = with python3.pkgs; [
+    beautifulsoup4
+    cryptography
+    feedparser
+    pillow
+    readability-lxml
+    requests
+    setproctitle
+  ];
+  otherDependencies = [
+    less
+    ripgrep
+    timg
+    xdg-utils
+    xsel
+  ];
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "offpunk";
+  version = "1.4";
+
+  src = fetchFromGitea {
+    domain = "notabug.org";
+    owner = "ploum";
+    repo = "offpunk";
+    rev = "v${finalAttrs.version}";
+    sha256 = "04dzkzsan1cnrslsvfgn1whpwald8xy34wqzvq81hd2mvw9a2n69";
+  };
+
+  buildInputs = [ makeWrapper ] ++ otherDependencies ++ pythonDependencies;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D ./offpunk.py $out/bin/offpunk
+
+    wrapProgram $out/bin/offpunk \
+        --set PYTHONPATH "$PYTHONPATH" \
+        --set PATH ${lib.makeBinPath otherDependencies}
+
+   runHook postInstall
+  '';
+
+  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;
+  };
+})