nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitea,
4 buildNpmPackage,
5 writeText,
6 # https://codeberg.org/emersion/gamja/src/branch/master/doc/config-file.md
7 gamjaConfig ? null,
8}:
9buildNpmPackage rec {
10 pname = "gamja";
11 version = "1.0.0-beta.11";
12
13 src = fetchFromGitea {
14 domain = "codeberg.org";
15 owner = "emersion";
16 repo = "gamja";
17 rev = "v${version}";
18 hash = "sha256-amwJ6PWS0In7ERcvZr5XbJyHedSwJGAUUS2vWIqktNE=";
19 };
20
21 npmDepsHash = "sha256-5YU9H3XHwZADdIvKmS99cAFFg69GPJzD9u0LOuJmKXE=";
22
23 installPhase = ''
24 runHook preInstall
25
26 cp -r dist $out
27 ${lib.optionalString (
28 gamjaConfig != null
29 ) "cp ${writeText "gamja-config" (builtins.toJSON gamjaConfig)} $out/config.json"}
30
31 runHook postInstall
32 '';
33
34 meta = with lib; {
35 description = "Simple IRC web client";
36 homepage = "https://codeberg.org/emersion/gamja";
37 license = licenses.agpl3Only;
38 maintainers = with maintainers; [
39 motiejus
40 apfelkuchen6
41 ];
42 };
43}