zaphyra's git: nixfiles

zaphyra and void's nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
{
  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 ];
  };
})