From 355e12b665339290efd7d08180d423973d70228f Mon Sep 17 00:00:00 2001 From: Nabeen Tiwaree Date: Tue, 29 Oct 2024 03:15:15 -0400 Subject: [PATCH] x4: init at 0.1.0 (#346736) Co-authored-by: aleksana --- pkgs/by-name/x4/x4/package.nix | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pkgs/by-name/x4/x4/package.nix diff --git a/pkgs/by-name/x4/x4/package.nix b/pkgs/by-name/x4/x4/package.nix new file mode 100644 index 0000000000000..d0c153b4c5a20 --- /dev/null +++ b/pkgs/by-name/x4/x4/package.nix @@ -0,0 +1,50 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + openssl, + zlib, + stdenv, + darwin, +}: + +rustPlatform.buildRustPackage rec { + pname = "x4"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "pwnwriter"; + repo = "x4"; + rev = "v${version}"; + hash = "sha256-IF+8lu56fzYM79p7MiNpVLFIs2GKPlzw5pNXD/hT6BM="; + }; + + cargoHash = "sha256-p3iMqnRW/quk2AHr2nLgOTvtshZ+xo6DGvWDsDj+bvU="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = + [ + openssl + zlib + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + env = { + OPENSSL_NO_VENDOR = true; + }; + + meta = { + description = "Execute shell commands to server(s) via ssh protocol"; + homepage = "https://github.com/pwnwriter/x4"; + changelog = "https://github.com/pwnwriter/x4/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pwnwriter ]; + mainProgram = "x4"; + }; +}