zaphyra's git: nixfiles

zaphyra and void's nixfiles

commit f6ba49be40cecd36cadb298b9dd9ecfe2ef09d1e
parent 59e57fed814abbd7d4f45e299ab92837399895a0
Author: Katja (zaphyra) <git@ctu.cx>
Date: Mon, 2 Jun 2025 08:33:08 +0200

packages: add `phanpy` - a fediverse web-client
1 file changed, 45 insertions(+), 0 deletions(-)
A
packages/phanpy.nix
|
45
+++++++++++++++++++++++++++++++++++++++++++++
diff --git a/packages/phanpy.nix b/packages/phanpy.nix
@@ -0,0 +1,45 @@
+{
+  lib,
+  fetchFromGitHub,
+  buildNpmPackage,
+  clientName ? "Phanpy",
+  website ? "https://phanpy.social",
+  defaultInstance ? "",
+  defaultInstanceRegistrationUrl ? "",
+  defaultLang ? "en",
+  ... }:
+
+buildNpmPackage (finalAttrs: {
+  pname = "phanpy";
+  version = "2025.04.28.5849b4d";
+
+  src = fetchFromGitHub {
+    owner = "cheeaun";
+    repo = "phanpy";
+    tag = finalAttrs.version;
+    hash = "sha256-Mp8ckYktjhQwuxirlMntzaA2IbExGaPPEj4IAKibvEQ=";
+  };
+
+  npmDepsHash = "sha256-02comyhYcY7Q71Cx9RCWIeKz1RwNcJPtSR5/EB2v+jU=";
+
+  NODE_OPTIONS = "--openssl-legacy-provider";
+
+  env = {
+    PHANPY_CLIENT_NAME = clientName;
+    PHANPY_WEBSITE = website;
+    PHANPY_DEFAULT_INSTANCE = defaultInstance;
+    PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL = defaultInstanceRegistrationUrl;
+    PHANPY_DEFAULT_LANG = defaultLang;
+  };
+
+  installPhase = ''
+    cp -r ./dist $out
+  '';
+
+  meta = {
+    description = "A minimalistic opinionated Mastodon web client ";
+    homepage = "https://github.com/cheeaun/phanpy";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ ctucx ];
+  };
+})