diff --git a/pkgs/by-name/ra/rates/package.nix b/pkgs/by-name/ra/rates/package.nix new file mode 100644 index 000000000000..3360f3961666 --- /dev/null +++ b/pkgs/by-name/ra/rates/package.nix @@ -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"; + }; +} diff --git a/pkgs/tools/misc/rates/default.nix b/pkgs/tools/misc/rates/default.nix deleted file mode 100644 index c774721eeecc..000000000000 --- a/pkgs/tools/misc/rates/default.nix +++ /dev/null @@ -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"; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cbc3c0f09df3..b1a6abe4cedf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {