diff --git a/pkgs/tools/networking/rustcat/default.nix b/pkgs/tools/networking/rustcat/default.nix index dba12bf58ac4..0933137335eb 100644 --- a/pkgs/tools/networking/rustcat/default.nix +++ b/pkgs/tools/networking/rustcat/default.nix @@ -1,8 +1,10 @@ -{ lib -, stdenv -, fetchFromGitHub -, rustPlatform -, Security +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + Security, + versionCheckHook, }: rustPlatform.buildRustPackage rec { @@ -11,18 +13,25 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "robiot"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-/6vNFh7n6WvYerrL8m9sgUKsO2KKj7/f8xc4rzHy9Io="; + repo = "rustcat"; + rev = "refs/tags/v${version}"; + hash = "sha256-/6vNFh7n6WvYerrL8m9sgUKsO2KKj7/f8xc4rzHy9Io="; }; cargoHash = "sha256-wqoU9UfXDmf7KIHgFif5rZfZY8Zu0SsaMVfwTtXLzHg="; buildInputs = lib.optional stdenv.hostPlatform.isDarwin Security; + nativeInstallCheckInputs = [ versionCheckHook ]; + + doInstallCheck = true; + + versionCheckProgram = [ "${placeholder "out"}/bin/rcat" ]; + meta = with lib; { description = "Port listener and reverse shell"; homepage = "https://github.com/robiot/rustcat"; + changelog = "https://github.com/robiot/rustcat/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ fab ]; mainProgram = "rcat";