config/pkgs/gamja.nix

38 lines
901 B
Nix
Raw Normal View History

2024-02-12 15:10:20 +02:00
{
lib,
fetchFromSourcehut,
buildNpmPackage,
writeText,
2024-02-12 22:46:27 +02:00
# https://git.sr.ht/~emersion/gamja/tree/master/doc/config-file.md
2024-02-12 15:10:20 +02:00
gamjaConfig ? null,
2024-02-13 13:45:09 +02:00
}:
buildNpmPackage rec {
pname = "gamja";
2024-02-12 15:10:20 +02:00
version = "1.0.0-beta.9";
2024-02-13 13:45:09 +02:00
src = fetchFromSourcehut {
owner = "~emersion";
repo = "gamja";
rev = "v${version}";
hash = "sha256-09rCj9oMzldRrxMGH4rUnQ6wugfhfmJP3rHET5b+NC8=";
2024-02-12 22:46:27 +02:00
};
2024-02-12 15:10:20 +02:00
2024-02-13 13:45:09 +02:00
npmDepsHash = "sha256-LxShwZacCctKAfMNCUMyrSaI1hIVN80Wseq/d8WITkc=";
2024-02-12 15:10:20 +02:00
2024-02-13 13:45:09 +02:00
installPhase = ''
runHook preInstall
2024-02-12 16:19:46 +02:00
2024-02-13 13:45:09 +02:00
cp -r dist $out
${lib.optionalString (gamjaConfig != null) "cp ${writeText "gamja-config" (builtins.toJSON gamjaConfig)} $out/config.json"}
2024-02-12 16:19:46 +02:00
2024-02-13 13:45:09 +02:00
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];
};
}