2023-09-01 19:46:12 +00:00
|
|
|
{ lib, buildNpmPackage, fetchFromGitHub, writeText, jq, conf ? { } }:
|
2021-12-20 14:04:01 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
2023-09-01 19:46:12 +00:00
|
|
|
in
|
|
|
|
buildNpmPackage rec {
|
2021-12-20 14:04:01 +00:00
|
|
|
pname = "cinny";
|
2023-03-29 04:42:23 +00:00
|
|
|
version = "2.2.6";
|
2021-12-20 14:04:01 +00:00
|
|
|
|
2023-09-01 19:46:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cinnyapp";
|
|
|
|
repo = "cinny";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-Da/gbq9piKvkIMiamoafcRrqxF7128GXoswk2C43An8=";
|
2021-12-20 14:04:01 +00:00
|
|
|
};
|
|
|
|
|
2023-09-01 19:46:12 +00:00
|
|
|
npmDepsHash = "sha256-3wgB/dQmLtwxbRsk+OUcyfx98vpCvhvseEOCrJIFohY=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
jq
|
|
|
|
];
|
|
|
|
|
2021-12-20 14:04:01 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2023-09-01 19:46:12 +00:00
|
|
|
cp -r dist $out
|
|
|
|
jq -s '.[0] * .[1]' "config.json" "${configOverrides}" > "$out/config.json"
|
2021-12-20 14:04:01 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Yet another Matrix client for the web";
|
|
|
|
homepage = "https://cinny.in/";
|
2023-10-22 21:48:18 +00:00
|
|
|
maintainers = with maintainers; [ abbe ashkitten ];
|
2023-09-01 19:46:12 +00:00
|
|
|
license = licenses.agpl3Only;
|
2021-12-20 14:04:01 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|