2024-12-03 09:31:03 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
rustPlatform,
|
|
|
|
Security,
|
2024-12-03 09:33:50 +00:00
|
|
|
versionCheckHook,
|
2022-08-18 11:54:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "coinlive";
|
2023-01-13 01:13:32 +00:00
|
|
|
version = "0.2.2";
|
2022-08-18 11:54:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mayeranalytics";
|
2024-12-03 09:31:03 +00:00
|
|
|
repo = "coinlive";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-13 01:13:32 +00:00
|
|
|
hash = "sha256-llw97jjfPsDd4nYi6lb9ug6sApPoD54WlzpJswvdbRs=";
|
2022-08-18 11:54:01 +00:00
|
|
|
};
|
|
|
|
|
2024-07-02 09:04:59 +00:00
|
|
|
cargoHash = "sha256-T1TgwnohUDvfpn6GXNP4xJGHM3aenMK+ORxE3z3PPA4=";
|
2022-08-18 11:54:01 +00:00
|
|
|
|
2024-12-03 09:31:03 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2022-08-18 11:54:01 +00:00
|
|
|
|
2024-12-03 09:31:03 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
openssl
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
Security
|
|
|
|
];
|
2022-08-18 11:54:01 +00:00
|
|
|
|
2024-12-03 09:33:50 +00:00
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
|
|
|
2023-01-13 01:13:32 +00:00
|
|
|
checkFlags = [
|
2024-12-03 09:31:03 +00:00
|
|
|
# Test requires network access
|
2023-01-13 01:13:32 +00:00
|
|
|
"--skip=utils::test_get_infos"
|
|
|
|
];
|
|
|
|
|
2024-12-03 09:33:50 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
2022-08-18 11:54:01 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Live cryptocurrency prices CLI";
|
|
|
|
homepage = "https://github.com/mayeranalytics/coinlive";
|
2024-12-03 09:31:03 +00:00
|
|
|
changelog = "https://github.com/mayeranalytics/coinlive/releases/tag/v${version}";
|
2022-08-18 11:54:01 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "coinlive";
|
2022-08-18 11:54:01 +00:00
|
|
|
};
|
|
|
|
}
|