2023-10-21 20:59:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildNpmPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, writeText
|
|
|
|
, jq
|
|
|
|
, python3
|
|
|
|
, pkg-config
|
|
|
|
, pixman
|
|
|
|
, cairo
|
|
|
|
, pango
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
, 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";
|
2024-06-21 17:40:02 +00:00
|
|
|
version = "3.2.0";
|
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}";
|
2024-06-21 17:40:02 +00:00
|
|
|
hash = "sha256-wAa7y2mXPkXAfirRSFqwZYIJK0CKDzZG8ULzXzr4zZ4=";
|
2021-12-20 14:04:01 +00:00
|
|
|
};
|
|
|
|
|
2024-06-21 17:40:02 +00:00
|
|
|
npmDepsHash = "sha256-dVdylvclUIHvF5syVumdxkXR4bG1FA4LOYg3GmnNzXE=";
|
2023-09-01 19:46:12 +00:00
|
|
|
|
2024-05-12 18:21:49 +00:00
|
|
|
# Fix error: no member named 'aligned_alloc' in the global namespace
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString (
|
|
|
|
stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0"
|
|
|
|
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
|
|
|
|
|
2023-09-01 19:46:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
jq
|
2023-10-21 20:59:43 +00:00
|
|
|
python3
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pixman
|
|
|
|
cairo
|
|
|
|
pango
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreText
|
2023-09-01 19:46:12 +00:00
|
|
|
];
|
|
|
|
|
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/";
|
2024-07-02 16:11:30 +00:00
|
|
|
maintainers = with maintainers; [ abbe ];
|
2023-09-01 19:46:12 +00:00
|
|
|
license = licenses.agpl3Only;
|
2021-12-20 14:04:01 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|