about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/cinny
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish.is@lostca.se>2021-12-20 19:34:01 +0530
committerAshish SHUKLA <ashish.is@lostca.se>2021-12-20 19:34:01 +0530
commita76dcd5293dcb110f14e05f312fa86b19a2def56 (patch)
tree03f9b1aa292ec489d429952e327441de26e10042 /pkgs/applications/networking/instant-messengers/cinny
parentb0bf5f888d377dd2f36d90340df6dc9f035aaada (diff)
cinny: init at 1.6.1
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/cinny')
-rw-r--r--pkgs/applications/networking/instant-messengers/cinny/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/applications/networking/instant-messengers/cinny/default.nix b/pkgs/applications/networking/instant-messengers/cinny/default.nix
new file mode 100644
index 0000000000000..4c8f356cdf479
--- /dev/null
+++ b/pkgs/applications/networking/instant-messengers/cinny/default.nix
@@ -0,0 +1,31 @@
+{ lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
+
+let
+  configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
+in stdenv.mkDerivation rec {
+  pname = "cinny";
+  version = "1.6.1";
+
+  src = fetchurl {
+    url = "https://github.com/ajbura/cinny/releases/download/v${version}/cinny-v${version}.tar.gz";
+    sha256 = "sha256-RJpLK16bedpqo/JJf3atpiuL5spHJNowomcusjZtEWA=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/
+    cp -R . $out/
+    ${jq}/bin/jq -s '.[0] * .[1]' "config.json" "${configOverrides}" > "$out/config.json"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Yet another Matrix client for the web";
+    homepage = "https://cinny.in/";
+    maintainers = with maintainers; [ abbe ];
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}