2020-01-03 10:18:45 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
2020-07-05 10:54:21 +00:00
|
|
|
, Foundation
|
2022-02-19 21:37:33 +00:00
|
|
|
, dbusSupport ? stdenv.isLinux, dbus
|
|
|
|
# rustls will be used for TLS if useOpenSSL=false
|
|
|
|
, useOpenSSL ? stdenv.isLinux, openssl
|
|
|
|
, notificationSupport ? stdenv.isLinux
|
2020-01-03 10:18:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tiny";
|
2021-11-07 04:20:00 +00:00
|
|
|
version = "0.10.0";
|
2020-01-03 10:18:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "osa1";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-11-07 04:20:00 +00:00
|
|
|
sha256 = "177d1x4z0mh0p7c5ldq70cn1j3pac50d8cil2ni50hl49c3x6yy1";
|
2020-01-03 10:18:45 +00:00
|
|
|
};
|
|
|
|
|
2021-11-07 04:20:00 +00:00
|
|
|
cargoSha256 = "05q3f1wp48mwkz8n0102rwb6jzrgpx3dlbxzf3zcw8r1mblgzim1";
|
2020-01-03 10:18:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = lib.optional stdenv.isLinux pkg-config;
|
2022-02-19 21:37:33 +00:00
|
|
|
buildInputs = lib.optionals dbusSupport [ dbus ]
|
|
|
|
++ lib.optionals useOpenSSL [ openssl ]
|
|
|
|
++ lib.optional stdenv.isDarwin Foundation;
|
2020-01-03 10:18:45 +00:00
|
|
|
|
2022-02-19 21:37:33 +00:00
|
|
|
buildFeatures = lib.optional notificationSupport "desktop-notifications";
|
2021-11-16 00:00:06 +00:00
|
|
|
|
2020-01-03 10:18:45 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A console IRC client";
|
|
|
|
homepage = "https://github.com/osa1/tiny";
|
2021-11-07 04:20:00 +00:00
|
|
|
changelog = "https://github.com/osa1/tiny/raw/v${version}/CHANGELOG.md";
|
2020-01-03 10:18:45 +00:00
|
|
|
license = licenses.mit;
|
2021-08-08 16:04:59 +00:00
|
|
|
maintainers = with maintainers; [ Br1ght0ne vyp ];
|
2020-01-03 10:18:45 +00:00
|
|
|
};
|
|
|
|
}
|