about summary refs log tree commit diff
path: root/pkgs/servers/honk
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2022-11-26 12:44:34 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2022-11-28 20:28:10 +0700
commitf5339d2339ebc728e32131c8141786b0e5e30cce (patch)
treec5b9cefd9229d4cc0f8fca880e8405086f6a62e0 /pkgs/servers/honk
parentcdb450dcbaed137886897fc5497bade0c895b296 (diff)
honk: init at 0.9.8
Honk is a minimalistic ActivityPub server.
https://humungus.tedunangst.com/r/honk
Diffstat (limited to 'pkgs/servers/honk')
-rw-r--r--pkgs/servers/honk/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/servers/honk/default.nix b/pkgs/servers/honk/default.nix
new file mode 100644
index 0000000000000..913b607ac8435
--- /dev/null
+++ b/pkgs/servers/honk/default.nix
@@ -0,0 +1,44 @@
+{ lib, buildGoModule, fetchurl, installShellFiles, sqlite }:
+
+buildGoModule rec {
+  pname = "honk";
+  version = "0.9.8";
+
+  src = fetchurl {
+    url = "https://humungus.tedunangst.com/r/honk/d/honk-${version}.tgz";
+    sha256 = "0vh8y1aj2w0y2zxmybhik4iv7myyldfzkd75nzgmlz3vycr60rh6";
+  };
+  vendorHash = null;
+
+  buildInputs = [ sqlite ];
+  nativeBuildInputs = [ installShellFiles ];
+  subPackages = [ "." ];
+
+  postPatch = ''
+    substituteInPlace honk.go --replace \
+      "var viewDir = \".\"" \
+      "var viewDir = \"$out/share/honk\""
+  '';
+
+  postInstall = ''
+    mkdir -p $out/share/${pname}
+    mkdir -p $out/share/doc/${pname}
+
+    mv docs/{,honk-}intro.1
+    mv docs/{,honk-}hfcs.1
+    mv docs/{,honk-}vim.3
+    mv docs/{,honk-}activitypub.7
+
+    installManPage docs/honk.1 docs/honk.3 docs/honk.5 docs/honk.8 \
+      docs/honk-intro.1 docs/honk-hfcs.1 docs/honk-vim.3 docs/honk-activitypub.7
+    mv docs/{*.html,*.txt,*.jpg,*.png} $out/share/doc/${pname}
+    mv views $out/share/${pname}
+  '';
+
+  meta = with lib; {
+    description = "An ActivityPub server with minimal setup and support costs.";
+    homepage = "https://humungus.tedunangst.com/r/honk";
+    license = licenses.isc;
+    maintainers = with maintainers; [ huyngo ];
+  };
+}