Files
nixpkgs/pkgs/by-name/nh/nheko/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

117 lines
2.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
asciidoc,
pkg-config,
cmark,
coeurl,
curl,
kdsingleapplication,
libevent,
libsecret,
lmdb,
lmdbxx,
mtxclient,
nlohmann_json,
olm,
re2,
spdlog,
gst_all_1,
libnice,
qt6Packages,
fetchpatch,
withVoipSupport ? stdenv.hostPlatform.isLinux,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nheko";
version = "0.12.1";
src = fetchFromGitHub {
owner = "Nheko-Reborn";
repo = "nheko";
rev = "v${finalAttrs.version}";
hash = "sha256-WlWxe4utRSc9Tt2FsnhBwxzQsoDML2hvm3g5zRnDEiU=";
};
patches = [
# Fixes rendering replies with QT 6.9.2
(fetchpatch {
url = "https://github.com/Nheko-Reborn/nheko/commit/2769642d3c7bd3c0d830b2f18ef6b3bf6a710bf4.patch";
hash = "sha256-y8aiS6h5CSJYBdsAH4jYhAyrFug7aH2H8L6rBfULnQQ=";
})
./fix-darwin-build.patch
];
nativeBuildInputs = [
asciidoc
cmake
lmdbxx
pkg-config
qt6Packages.wrapQtAppsHook
];
buildInputs = [
cmark
coeurl
curl
kdsingleapplication
libevent
libsecret
lmdb
mtxclient
nlohmann_json
olm
qt6Packages.qtbase
qt6Packages.qtdeclarative
qt6Packages.qtimageformats
qt6Packages.qtkeychain
qt6Packages.qtmultimedia
qt6Packages.qtsvg
qt6Packages.qttools
qt6Packages.qt-jdenticon
re2
spdlog
]
++ lib.optionals stdenv.hostPlatform.isLinux [
qt6Packages.qtwayland
]
++ lib.optionals withVoipSupport [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
(gst_all_1.gst-plugins-good.override { qt6Support = true; })
gst_all_1.gst-plugins-bad
libnice
];
cmakeFlags = [
(lib.cmakeBool "VOIP" withVoipSupport)
];
preFixup = ''
# unset QT_STYLE_OVERRIDE to avoid showing a blank window when started
# https://github.com/NixOS/nixpkgs/issues/333009
qtWrapperArgs+=(--unset QT_STYLE_OVERRIDE)
''
+ lib.optionalString withVoipSupport ''
# add gstreamer plugins path to the wrapper
qtWrapperArgs+=(--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0")
'';
meta = with lib; {
description = "Desktop client for the Matrix protocol";
homepage = "https://github.com/Nheko-Reborn/nheko";
license = licenses.gpl3Plus;
mainProgram = "nheko";
maintainers = with maintainers; [
ekleog
fpletz
rebmit
rnhmjoj
];
platforms = platforms.all;
};
})