nixpkgs/pkgs/tools/misc/websocat/default.nix

36 lines
1.1 KiB
Nix
Raw Normal View History

2020-04-24 02:37:49 +00:00
{ stdenv, fetchFromGitHub, pkgconfig, openssl, rustPlatform, Security, makeWrapper, bash }:
rustPlatform.buildRustPackage rec {
2019-08-31 11:41:23 +00:00
pname = "websocat";
2019-12-05 16:40:54 +00:00
version = "1.5.0";
src = fetchFromGitHub {
2019-12-05 16:40:54 +00:00
owner = "vi";
repo = "websocat";
rev = "v${version}";
sha256 = "1lmra91ahpk4gamhnbdr066hl4vzwfh5i09fbabzdnxcvylbx8zf";
};
2019-06-04 08:28:04 +00:00
cargoBuildFlags = [ "--features=ssl" ];
cargoSha256 = "09chj0bgf4r8v5cjq0hvb84zvh98nrzrh1m0wdqjy5gi7zc30cis";
2020-04-24 02:37:49 +00:00
nativeBuildInputs = [ pkgconfig makeWrapper ];
2019-06-04 08:28:04 +00:00
buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security;
2019-03-19 08:21:18 +00:00
2020-04-24 02:37:49 +00:00
# The wrapping is required so that the "sh-c" option of websocat works even
# if sh is not in the PATH (as can happen, for instance, when websocat is
# started as a systemd service).
postInstall = ''
wrapProgram $out/bin/websocat \
--prefix PATH : ${stdenv.lib.makeBinPath [ bash ]}
'';
meta = with stdenv.lib; {
description = "Command-line client for WebSockets (like netcat/socat)";
2019-12-05 16:40:54 +00:00
homepage = "https://github.com/vi/websocat";
license = licenses.mit;
2019-12-05 16:41:12 +00:00
maintainers = with maintainers; [ thoughtpolice filalex77 ];
2019-12-05 16:40:54 +00:00
platforms = platforms.all;
};
}