2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wthrr";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.2.0";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-07-27 06:49:29 +00:00
|
|
|
owner = "ttytm";
|
2023-04-29 16:46:19 +00:00
|
|
|
repo = "wthrr-the-weathercrab";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-3bWO2Gl8/B2p4k/6QhlT46RvyMJJs7WkVcX35vWN2Fk=";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cargoHash = "sha256-8Uy+8UpCQyLaLsulpgC1w2XI9aqj2P5ebBlXqpuDIc4=";
|
2023-04-29 16:46:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
2024-07-27 06:49:29 +00:00
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
2023-04-29 16:46:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# requires internet access
|
|
|
|
"--skip=modules::localization::tests::translate_string"
|
|
|
|
"--skip=modules::location::tests::geolocation_response"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Weather companion for the terminal";
|
2024-07-27 06:49:29 +00:00
|
|
|
homepage = "https://github.com/ttytm/wthrr-the-weathercrab";
|
|
|
|
changelog = "https://github.com/ttytm/wthrr-the-weathercrab/releases/tag/${src.rev}";
|
2023-04-29 16:46:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "wthrr";
|
2023-04-29 16:46:19 +00:00
|
|
|
};
|
|
|
|
}
|