Merge pull request #217108 from sikmir/nchat

nchat: init at 3.17
This commit is contained in:
Sandro 2023-02-21 10:15:09 +01:00 committed by GitHub
commit 8c922b23f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{ lib, stdenv, fetchFromGitHub, cmake, gperf
, file, ncurses, openssl, readline, sqlite, zlib
, AppKit, Cocoa, Foundation
}:
stdenv.mkDerivation rec {
pname = "nchat";
version = "3.17";
src = fetchFromGitHub {
owner = "d99kris";
repo = "nchat";
rev = "v${version}";
hash = "sha256-BtWKt8paI0gCGSzLYN8x3Yp5MUpwCb2vBGcGQG2aumY=";
};
postPatch = ''
substituteInPlace lib/tgchat/ext/td/CMakeLists.txt \
--replace "get_git_head_revision" "#get_git_head_revision"
'';
nativeBuildInputs = [ cmake gperf ];
buildInputs = [
file # for libmagic
ncurses
openssl
readline
sqlite
zlib
] ++ lib.optional stdenv.isDarwin [ AppKit Cocoa Foundation ];
cmakeFlags = [
"-DHAS_WHATSAPP=OFF" # go module build required
];
meta = with lib; {
description = "Terminal-based chat client with support for Telegram and WhatsApp";
homepage = "https://github.com/d99kris/nchat";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
}

View file

@ -31974,6 +31974,10 @@ with pkgs;
ngt = callPackage ../development/libraries/ngt { };
nchat = callPackage ../applications/networking/instant-messengers/nchat {
inherit (darwin.apple_sdk.frameworks) AppKit Cocoa Foundation;
};
nheko = libsForQt5.callPackage ../applications/networking/instant-messengers/nheko {
# https://github.com/NixOS/nixpkgs/issues/201254
stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc11Stdenv else stdenv;