nixpkgs/pkgs/applications/networking/instant-messengers/nchat/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

2023-02-19 09:18:09 +00:00
{ lib, stdenv, fetchFromGitHub, cmake, gperf
, file, ncurses, openssl, readline, sqlite, zlib
, AppKit, Cocoa, Foundation
}:
stdenv.mkDerivation rec {
pname = "nchat";
2023-10-05 11:20:38 +00:00
version = "3.67";
2023-02-19 09:18:09 +00:00
src = fetchFromGitHub {
owner = "d99kris";
repo = "nchat";
rev = "v${version}";
2023-10-05 11:20:38 +00:00
hash = "sha256-PhvZejtSoDptzoMP5uIe6T0Ws/bQQXVuYH9uoZo3JsI=";
2023-02-19 09:18:09 +00:00
};
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.optionals stdenv.isDarwin [ AppKit Cocoa Foundation ];
2023-02-19 09:18:09 +00:00
cmakeFlags = [
"-DHAS_WHATSAPP=OFF" # go module build required
];
meta = with lib; {
description = "Terminal-based chat client with support for Telegram and WhatsApp";
mainProgram = "nchat";
2023-02-19 09:18:09 +00:00
homepage = "https://github.com/d99kris/nchat";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.unix;
};
}