rates: refactor (#361423)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
darwin,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rates";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lunush";
|
||||
repo = "rates";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-zw2YLTrvqbGKR8Dg5W+kJTDKIfro+MNyjHXfZMXZhaw=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-5EcTeMfa1GNp1q60qSgEi/I3298hXUD1Vc1K55XGW4I=";
|
||||
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Security ];
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
versionCheckProgramArg = [ "--version" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI tool that brings currency exchange rates right into your terminal";
|
||||
homepage = "https://github.com/lunush/rates";
|
||||
changelog = "https://github.com/lunush/rates/releases/tag/${version}";
|
||||
license = with licenses; [
|
||||
asl20
|
||||
mit
|
||||
];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
mainProgram = "rates";
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rates";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lunush";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-zw2YLTrvqbGKR8Dg5W+kJTDKIfro+MNyjHXfZMXZhaw=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-5EcTeMfa1GNp1q60qSgEi/I3298hXUD1Vc1K55XGW4I=";
|
||||
|
||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security;
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI tool that brings currency exchange rates right into your terminal";
|
||||
homepage = "https://github.com/lunush/rates";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
mainProgram = "rates";
|
||||
};
|
||||
}
|
||||
@@ -18449,10 +18449,6 @@ with pkgs;
|
||||
|
||||
qzdl = libsForQt5.callPackage ../games/qzdl { };
|
||||
|
||||
rates = callPackage ../tools/misc/rates {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
||||
rbspy = darwin.apple_sdk_11_0.callPackage ../development/tools/rbspy { };
|
||||
|
||||
pick-colour-picker = python3Packages.callPackage ../applications/graphics/pick-colour-picker {
|
||||
|
||||
Reference in New Issue
Block a user