about summary refs log tree commit diff
path: root/pkgs/by-name/ga
diff options
context:
space:
mode:
authorAdam C. Stephens <2071575+adamcstephens@users.noreply.github.com>2024-03-10 08:57:35 -0400
committerGitHub <noreply@github.com>2024-03-10 08:57:35 -0400
commitf0892debecef4ab4762b63518e1c6482a0c7db97 (patch)
tree1ec8dd7ec0188d1096d3c89d3572f5b0ee1f22b0 /pkgs/by-name/ga
parent7b7c5b74192a6ac5b7f20b34ce3a57592502141e (diff)
parent9b0827fe9cdc70a048c466ea093bae45679ca033 (diff)
Merge pull request #292325 from motiejus/gamja
gamja: init at 1.0.0-beta.9
Diffstat (limited to 'pkgs/by-name/ga')
-rw-r--r--pkgs/by-name/ga/gamja/package.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/by-name/ga/gamja/package.nix b/pkgs/by-name/ga/gamja/package.nix
new file mode 100644
index 0000000000000..d72934038a8a8
--- /dev/null
+++ b/pkgs/by-name/ga/gamja/package.nix
@@ -0,0 +1,37 @@
+{
+  lib,
+  fetchFromSourcehut,
+  buildNpmPackage,
+  writeText,
+  # https://git.sr.ht/~emersion/gamja/tree/master/doc/config-file.md
+  gamjaConfig ? null,
+}:
+buildNpmPackage rec {
+  pname = "gamja";
+  version = "1.0.0-beta.9";
+
+  src = fetchFromSourcehut {
+    owner = "~emersion";
+    repo = "gamja";
+    rev = "v${version}";
+    hash = "sha256-09rCj9oMzldRrxMGH4rUnQ6wugfhfmJP3rHET5b+NC8=";
+  };
+
+  npmDepsHash = "sha256-LxShwZacCctKAfMNCUMyrSaI1hIVN80Wseq/d8WITkc=";
+
+  installPhase = ''
+    runHook preInstall
+
+    cp -r dist $out
+    ${lib.optionalString (gamjaConfig != null) "cp ${writeText "gamja-config" (builtins.toJSON gamjaConfig)} $out/config.json"}
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A simple IRC web client";
+    homepage = "https://git.sr.ht/~emersion/gamja";
+    license = licenses.agpl3Only;
+    maintainers = with maintainers; [motiejus apfelkuchen6];
+  };
+}