rustcat: refactor
- format with nixfmt - add versionCheckHook - add changelog to meta
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user