diff --git a/pkgs/tools/misc/coinlive/default.nix b/pkgs/by-name/co/coinlive/package.nix similarity index 51% rename from pkgs/tools/misc/coinlive/default.nix rename to pkgs/by-name/co/coinlive/package.nix index 564f19f85b97..96c5fe8e4ef1 100644 --- a/pkgs/tools/misc/coinlive/default.nix +++ b/pkgs/by-name/co/coinlive/package.nix @@ -1,10 +1,12 @@ -{ lib -, stdenv -, fetchFromGitHub -, openssl -, pkg-config -, rustPlatform -, Security +{ + lib, + stdenv, + darwin, + fetchFromGitHub, + openssl, + pkg-config, + rustPlatform, + versionCheckHook, }: rustPlatform.buildRustPackage rec { @@ -13,31 +15,36 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "mayeranalytics"; - repo = pname; - rev = "v${version}"; + repo = "coinlive"; + rev = "refs/tags/v${version}"; hash = "sha256-llw97jjfPsDd4nYi6lb9ug6sApPoD54WlzpJswvdbRs="; }; cargoHash = "sha256-T1TgwnohUDvfpn6GXNP4xJGHM3aenMK+ORxE3z3PPA4="; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ pkg-config ]; - buildInputs = [ - openssl - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - Security - ]; + buildInputs = + [ + openssl + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; checkFlags = [ - # requires network access + # Test requires network access "--skip=utils::test_get_infos" ]; + doInstallCheck = true; + meta = with lib; { description = "Live cryptocurrency prices CLI"; homepage = "https://github.com/mayeranalytics/coinlive"; + changelog = "https://github.com/mayeranalytics/coinlive/releases/tag/v${version}"; license = licenses.gpl3Only; maintainers = with maintainers; [ fab ]; mainProgram = "coinlive"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e864279ba1bd..b66b1ed67b82 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8928,10 +8928,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) OpenGL; }; - coinlive = callPackage ../tools/misc/coinlive { - inherit (darwin.apple_sdk.frameworks) Security; - }; - inherit (cosmopolitan) cosmocc; ctranslate2 = callPackage ../development/libraries/ctranslate2 rec {